Develop melodies according to the outlined musical structure, including the given motif.
X:1
L:1/8
M:2/2
K:G
['gegd B2', 'BGdG BcdB e2 dB'  
X:1
L:1/8
M:2/2
K:G
 a | gegd B2 Gd | BdGd BBBa | gegd B2 GB | e2 dB cAA | gegd B2 Gd | BdGd BBBa | efgd B2 GB | 
 e2 dB cAA || g | BGdG BGdG | BGdG AAAg | BGdG BcdB | e2 dB AAAg | BGdG g2 dB | GGdG BAAg | 
 BGdG BcdB | e2 dB cAA ||  