Create a musical piece that includes the provided motif while adhering to the necessary musical structure.
X:1
L:1/8
M:4/4
K:Amix
['d2 d>d d2 fe dcBA', 'A4 ecAc ecAc fdBd fdBd AFDF AFDF'  
X:1
L:1/8
M:4/4
K:Amix
 ABcd e2 f2 | d2 d>d d2 fe | dcBA ABcA | B2 E>E E2 ec | dcBA ABcA | d2 d>d d2 fe | dcBA (3Bcd cB | 
 A2 A<B A4 :| ecAc ecAc | fdBd fdBd | AFDF AFDF | BGEG BG E2 | ecAB ecef | d2 dd d2 fe | 
 dcBA (3Bcd cB | A2 A<B A4 :|  