Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['=c2 BAGB ABAG EDEG'  
X:1
L:1/8
M:4/4
K:D
"A" c4 a4 B4 g4 |"A" efed c2 cd |"A" ecef"G" gaba |"E" ^g2 e2 e2 e=g |"A" abaf"G" gagf | 
"A" efed cdef |"G" g2 d2"E" efed |"A" c2 A2 A4 ::"Am" =c2 cA"G" BAGB |"Am" ABAG EDEG | 
"Am" AGAB"C" =cBcd |"Em" e2 eg edBA |"Am" =c2 cA"G" BAGB |"Am" ABAG EDEG |"Am" =cBAc"G" BAGB | 
"Am" A3 B A4 :|  