Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:4/4
K:D
['B2 AG', 'defg afdf']  
X:1
L:1/8
M:4/4
K:D
 B2 AG FDDG | FDAG FDDc | B2 AG FDDF | GFEF GABc | B2 AG FDDG | FDAG FDDB | cBAG FDDF | 
 GFEF GABc || defg afdf | gefd edBc | defg afdf | egfd e2 d2 | defg afbf | gefd edBc | dBcA Bcde | 
 fdgf edcA ||  