Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/4
M:4/4
K:G
['c _B']  
X:1
L:1/4
M:4/4
K:G
 G2 | G2 _B2 | A2 d2 | c3/2 d/ c _B | A2 z _B | G2 d2 | c2 d2 | G3/2 A/ _B B | c2 z _B | A d c _B | 
 c2 z G | _B B c c | d d _B d | c _B A G | _B2 A2 | G2 |]  