Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['A2 A2']  
X:1
L:1/8
M:4/4
K:D
 DF | A2 A2 A2 BG | GFFF F2 AF | E3 FAGGF | F2 E2 z2 A2 | B2 AA B2 cA | d2 cB A2 z G | GF F2 AGFE | 
 E2 D2 z2 |]  