Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
Q:1/4=120
M:4/4
K:A
['e a2 ga f2']  
X:1
L:1/8
Q:1/4=120
M:4/4
K:A
"^Moderate." E | (A>B)c>d e2 ee | (B>c)d>e f3 e | a2 ga f2 e>c | A2 B>B c3 e | a2 ga f2 (e>a) | 
 (ec)BA B2 (A>B) | e3 e fefc | B4 A2 z2 |]  