Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:4/4
K:D
['dA A2 FA A2', 'defe f3 g-']  
X:1
L:1/8
M:4/4
K:D
 dA A2 FA A2 | dAeA fAeA | dA A2 FA A2 | E3 E- EFGA | dA A2 FA A2 | dAeA fAef | g3 f- fgfe | 
 dBBA d3 A :| defe f3 g- | gfed BcdA | defe f3 g- | gfea fedA | defe f3 g- | gfed Bcde | 
 fAAf gAfA | edce d4 :|  