Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['A,B,D(E D2) D(E F2) BF ABA(F G2)', 'A2 e2 e(f e2) e(f gf)e(d cA)Bc'  
X:1
L:1/8
M:4/4
K:D
 A,B,D(E D2) D(E | F2) BF ABA(F | G2) B(G F2) A(F | ED)E(F ED) B,G, | A,B,D(E D2) D(E | 
 F2) BF ABA(F | G2) B(G FG)A(F |1 ED)EF D2 DB, :|2 EDE(F D2) dB |: A2 B2 d2 cd | efe(d cB) A2 | 
 e2 e(f e2) e(f | gf)e(d cA)Bc | d2 f(d c2) e(c | B)AB(c d)BA(F | G2) B(G F2) A(F |1 
 ED)EF D2 dB :|  