Create a musical piece that includes the provided motif while adhering to the necessary musical structure.
X:1
L:1/8
Q:1/8=160
M:12/8
K:D
['B ABc A2 f e2 d e2', 'a2 f'  
X:1
L:1/8
Q:1/8=160
M:12/8
K:D
 B | ABc A2 f e2 d e2 f | A2 A BAB d3 d2 B | ABc A2 f e2 d e2 f | A2 A BAB d3 d2 f || 
 a2 f d2 f e2 d e2 f | a2 f dfa b3 b3 | a2 f g2 e fed e2 f | A2 A BAB d3 d2 ||  