Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:4/4
K:D
['ag f2 A2', 'A2 AB']  
X:1
L:1/8
M:4/4
K:D
 ag |:"D" f2 A2 f2 A2 | fefg fedf |"G" g2 B2 g2 B2 | gfga gfeg |"D" f2 A2 f2 A2 | fefg fedf | 
"G" gfed"A" cABc |"D" d2 f2 d4 ::"D" A2 AB AGFE | DFAd f2 d2 | A2 AB AG F2 |"A" E3 F E2 FG | 
"D" A2 AB AGFE | DFAd f2 ef |"G" gfed"A" cABc |"D" d2 f2 d4 :|  