Construct musical melodies following the designated letter arrangement and the given motif.
X:1
L:1/8
M:6/8
K:D
['d2 D FED ABA FED FAF', 'age dgd aga bag gfe g2 e']  
X:1
L:1/8
M:6/8
K:D
|:"D" d2 D FED | ABA FED |"G" GBG"D" FAF |"Em" EFG"A" ABc |"D" d2 D FED | ABA FED |"G" GBG"D" FAF | 
"A" EFE"D" D3 ::"D" ABc dcd |"Em" e3 edB |"D" AdA ede |"Bm" fed dcB |"D" ABc"G" d2 B |"D" AdB AFD | 
"G" GBG"D" FAF |"A" EFE"D" D3 :|[K:G]"^2nd Setting" |:"G" g2 G BAG | ded BAG |"C" cec"G" BdB | 
"Am" ABc"D" def |"G" g2 G BAG | ded BAG |"C" cec"G" BdB |"D" ABA"G" G3 ::"G" def gfg |"Am" a3 age | 
"G" dgd aga |"Em" bag gfe |"G" def"C" g2 e |"G" dge dBG |"C" cec"G" BdB |"D" ABA"G" G3 :|  