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
['', 'dB AFAd BcdB (3ABAdA e f3 AddA', 'D2 FD(3DED EFGE FD(3DED =C4 FA A2', 'agfd eA A2 EA g2'  
X:1
L:1/8
M:4/4
K:D
 dB |: AFAd BcdB | (3ABAdA e f3 | AddA BcdB | AF F2 EF D2 :: FD(3DED EFGE | FD(3DED =C4 | 
 FA A2 BcdB | cdec dBAG :| FA A2 agfd | eA A2 EA g2 | fd d2 agfd | edcB Acde | fd d2 agfd | 
 eA A2 EA g2 | fdge afed | cdec d4 ||  