Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:2/2
K:G
['(([Ae] [Bg]2)) [Bg] [Bg]2', '[EB][EA][EB]d e3 d'  
X:1
L:1/8
M:2/2
K:G
 (([Ae] [Bg]2)) [Bg] [Bg]2 [Bg][Bg] | agab a2 b2 | (([Ae] [Bg]2)) [Bg] [Bg]2 aa | aa b2 b2 a2 | 
 (([Ae] [Bg]2)) [Bg] [Bg]2 gg | abab a2 b2 | abaf gede | gedB A G3 :: [EB][EA][EB]d e3 d | 
 [EB]ABd B2 A>A | BABd e2 ed | gedB A2 GA | [EB][EA][EB]d e3 d | BABG (AB)GD | GABd e2 ae | 
 gedB A2 G2 :|  