Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:3/4
K:D
['D4 (3FED .d2 A2 F2 d2 fdge', '(3cBA .a2 .ed.cB Aa g2 f2 Tf4']  
X:1
L:1/8
M:3/4
K:D
 D4 (3FED | .d2 A2 F2 | d2 fdge | a4 f2 | g2 bgeg | f2 afdf | ef g2 f2 |{f} e6 :: A4 (3cBA | 
 .a2 .ed.cB | Aa g2 f2 | Tf4 e2 | d2 fdge | d'a a4 | egfgac | d6 :|  