Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:3/4
K:D
['(3ABA ^GA BA', 'G2 GD GB dD GB d2']  
X:1
L:1/8
M:3/4
K:D
|: FG | (3ABA ^GA BA | f2 f3 e | (3ded cd eB | d2 c4 | (3ABA ^GA BA | e2 e3 d | c2 ed cB | 
 cB A^G A2 | (3ABA ^GA BA | fd A4 | (3ded cd ed | c2 B2 B2 | g2 ag fe | fd AB cd | cB AG FE | D4 :: 
[K:G] D2 | G2 GD GB | dD GB d2 | (3ded ^cd eB | d2 c4 | F2 FD FA | c2 (3ccc c2 | c2 Bc dA | 
 dc B^A B2 | G2 GD GB | dD GB d2 | g2 fg ag | f2 e4 | a2 ag fe | f2 d4 | ee e2 f2 |1 g4 :|2 
 g2 A2 ||  