Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/8=360
M:4/4
K:G
['d2 BG', 'c2 Bc dggg'  
X:1
L:1/8
Q:1/8=360
M:4/4
K:G
 d2 BG dGGG | DGBd c2 Bc | dcBG DGBd | cBAB c2 ge | d2 BG DGGG | DGBd cABc | d2 BG DG G2 | 
 cBAB c4 || dggg dgeg | dggd c2 Bc | dggg defd | cBAB c2 Bc | dggg dgeg | dggd c2 Bc | dggg bgag | 
 fdef g4 |]  