Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
Q:1/2=110
M:4/4
K:G
['ga b2 ag f3 g a2 d4', 'c3 d']  
X:1
L:1/8
Q:1/2=110
M:4/4
K:G
 ga | b2 ag f3 g | a2 d4 ed | c3 B A2 Bc | d2 d4 :: AB | c3 d edef | g2 g4 cB | c3 d edcB | 
 A2 A4 cB | c3 d edef | efgf g2 Bc | d2 cB A2 Bc | B2 G4 :|  