Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:3/4
K:D
['', 'D2 (cd) A2', '(e>d) (c>B)'  
X:1
L:1/8
M:3/4
K:D
 (FG) |: (A>B) (A>G) (F>E) | D2 (cd) A2 | BA GF ED | DC EC A,2 | A>B A>G F>E | D2 (cd) A2 | 
 (a>f) (g>e) (a>c) |1 d4 (FG) :|2 d4 (cd) |]: (e>f) (e>d) (c>B) | A2 (g>f) a2 | A2 (f>e) f2 | 
 (e>f) (e>d) (c>B) | (A>c) (e>d) (c>B) | A2 (g>f) g2 | (a>f) (e>d) (c>e) |1 d4 (cd) :|2 d4 z2 |]  