Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:Dmix
['fd d2 Adfd ec c2 Gcec d2', 'eaag fd'  
X:1
L:1/8
M:4/4
K:Dmix
|: fd d2 Adfd | ec c2 Gcec | d2 fd Adfd | ecdB cAGc | dafa gefd | c2 Gc gceg | af(3gfe fd^cd | 
 eaag fd d2 :: d2 ef gefd | eage d^cAG | Adef g2 fg | eaag fd d2 | f2 dA FAEA | D2 fd gefg | 
 af(3gfe fd^cd | eaag fd d2 :|  