Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/4
M:4/4
K:G
['d d']  
X:1
L:1/4
M:4/4
K:G
 G | G d d/c/ _B | A A z A | _B/c/ d d/c/ B | A2 z G | d d =f/e/d/^c/ | d2 c A | d d =f/e/d/^c/ | 
 d2 c/_B/ A | _B A/G/ d d | G2 z |]  