Compose a musical piece using the given motif and adhering to the outlined musical form.
X:1
L:1/8
M:2/2
K:D
['A2 AB A F3 AFAd f2 fg', 'fgaf g2 fg edBc dBAF EFDF A2'  
X:1
L:1/8
M:2/2
K:D
|: A2 AB A F3 | AFAd f2 fg | afef dBAc | dBAF EFDF | A2 AB A F3 | AFAd f2 fg | afef dBAF |1 
 Affe d2 dB :|2 Affe d2 de |: fded BAFE | DFAd fgaf | g2 fg edBc | dBAF EFDF | A2 AB A F3 | 
 AFAd f2 fg | afef dBAF |1 Affe d2 de :|  