Develop melodies adhering to the specified musical structure and using the offered theme.
X:1
L:1/8
M:4/4
K:G
['(GA) BcBA B2 g2 dcBd B2 (AG)', 'gabg e3 d'  
X:1
L:1/8
M:4/4
K:G
|: (GA) | BcBA B2 g2 | dcBd B2 (AG) | ded^c d2 (gf) | e^deg A2 (gf) | edcB dcBA | cBAG A2 (GE) | 
 GFGA BGdB | A^GAB =G2 :: d2 | e^def g2 G2 | gabg e3 d | B2 d2 efgf | ed^ce d2 (Bd) | efga gfef | 
 gabg e3 d | BABc dcde | Bdef g2 (ef) | g2 (eg) edeg | dBde dcBA | G2 (ge) dgdB | A^GAB =G2 :|  