Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
Q:1/8=180
M:2/2
K:D
['fgfe dcdA', 'FEFD FAAc', 'FAAc BAdA cdeg fgef defe dBAG FD'  
X:1
L:1/8
Q:1/8=180
M:2/2
K:D
 de | fgfe dcdA | BdAd BdAd | fgfe dcdA | BdAF FEEd |"^5" fgfe dcdA | BdAd BdAd | afge fdec | 
 dBAG FD D2 ||"^9" fgab afdf | gaba bgeg | fgab afdA | BdAF FEEe |"^13" fgab afdf | gabg bgeg | 
 fgef defe | dBAG FD D2 ||"^17" FEFD FAAc | BAdA BAdA | FEFD FAAc | BAdF FEEG |"^21" FEFD FAAc | 
 BAdA cdeg | fgef defe | dBAG FD D2 |]  