Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:4/4
K:G
['g3 d BG G2 ABcA DFAd gfgd', 'dg g2', 'dg g2'  
X:1
L:1/8
M:4/4
K:G
 g3 d BG G2 | ABcA DFAd | gfgd Bcde |1 fdcA GABd :|2 fdcA G3 c || BGAF DEFE | F2 df ecdc | 
 BGAF DFeg | fdcA G3 c :|2 fdcA GABc || dg g2 dg g2 | dffe fgfe | dg g2 d^cde | fdcA GABc | 
 dg g2 dg g2 | dffe fgfe | defg a2 ag | fdcA G4 :|  