Compose melodies adhering to the given motif and the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['E2 BA', 'f2 af'  
X:1
L:1/8
M:4/4
K:D
 E2 BA FAFA | defe cAFD | E2 BA FAGA | Adef aecA | E2 BA FAGA | BAGA BAcA | Adef gecB |1 
 A2 d2 d2 D2 :|2 A2 d2 d2 A2 :| f2 af gecA | DFAd efge | f2 af gfed | cAce g2 g2 | f2 af gecA | 
 DFAd efge | fdge fdec | dBAF D2 D2 :|  