Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:2/2
K:G
['c BGAG BGAB cABG E/E/E EA GEDE', 'egdB cA (3BAG E2 ef g2 dg'  
X:1
L:1/8
M:2/2
K:G
 c | BGAG BGAB | cABG E/E/E EA | GEDE Gage |1 dBAB (!>!DG) G :|2 dBAB G/G/G G2 || ef | g2 dg egdB | 
 cA (3BAG E2 ef | g2 dg egdB | AGAB (!>!DG) fa | gdBd gdBd | ceBd AGEF | GEDE Gage | 
 dBAB G/G/G G2 ||  