Develop melodies according to the outlined musical structure, including the given motif.
X:1
L:1/8
M:4/4
K:G
['B2 A2 AG G2 z GAB c2']  
X:1
L:1/8
M:4/4
K:G
 DGB | d3 c B2 A2 | AG G2 z GAB | c2 A2 B2 d2 | A4 z AA^A | B3 B B2 A2 | AG G2 z GAB | 
 c2 A2 G2 F2 | d4 z dcB | AecA G2 BA | G4 z |]  