Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/4
M:4/4
K:Dmin
['d d', 'd2 c3/2 A/ c B A G'  
X:1
L:1/4
M:4/4
K:Dmin
 d d f2 | A A c2 | d d f g/f/ | e/d/ e d2 :: c3/2 A/ c B | A G F A | B/c/ d d ^c | d4 :|  