Compose a musical piece using the given motif and adhering to the outlined musical form.
X:1
L:1/8
M:4/4
K:D
['A2 dcdf ecAc dBGB AFDF EGFA GBgf', '(3ABA (3GFE'  
X:1
L:1/8
M:4/4
K:D
 A2 | dcdf ecAc | dBGB AFDF | EGFA GBgf | edcB AABc | dcdf e^deg | fefg afdA | BdcB AGFE | 
 D2 d2 d2 :| B2 | A^GAc ecAc | edcB Adfa | gfeg fedf | (3efe (3dcB (3ABA (3GFE | DFAd EGBd | 
 FAdf afda | BdcB (3ABA (3GFE | (3DFA (3dfa d' z :|  