Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:2/2
K:A
['a2 a2 b(ba)f e3', 'A2 AA'  
X:1
L:1/8
M:2/2
K:A
 e2 fg a2 a2 | b(ba)f e3 e | a2 a(a f2) e2 | ec B2 A4 | e2 fe a2 a2 | b(ba)f e3 (e | a3) (af) e3 | 
 (Bc) B2 A4 |: A2 AA BABc | ecBA c3 B | A2 AA BAcd | ec B2 A4 :|  