Construct melodies utilizing the provided motif and adhere to the outlined musical structure.
X:1
L:1/8
M:4/4
K:Amix
['a2 a(a g2) e2- e2 e(d c2)', 'A(B cB)A(c BA)GG'  
X:1
L:1/8
M:4/4
K:Amix
 a2 a(a g2) e2- | e2 e(d c2) cd | e3 (f gf)g(a | ba)g(f ef)ge | a/a/a (a2 g2) (g2 | 
 e)fe(d c2) c(d | cB)A(c BA)GG | A3 A- A2 AA :|[K:Amin] A z c z (B4 | A)BA(G E2) A2- | 
 A2 (B2 c2) dd | e3 (f ed)c(B | A2) A(A B2) B(B | A)BA(G E2) A(B | cB)A(c BA)GG | A3 A- A2 EA | 
 .A.A.A.c .c.B.B.B | .A.B.A.G .E.E.E.A | .A.A.B.B .c.c.d.d | .e.e.e.f .e.d.c.B | 
 .A.A.A.A .B.B.B.B | .A.B.A(G E) z A(B | cB)A(c BA)GG | A4 A2 AA ||  