Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
M:4/4
K:A
['EA, A,2', 'AB c2', 'g agfe dcBA'  
X:1
L:1/8
M:4/4
K:A
 CD | EA, A,2 EA,FA, | EA, A,2 A,3 c | dcBA GABc | B2 B,2 B,2 CD | EA, A,2 EA,FA, | EA, A,2 A,3 c | 
 dcBA GABc | A2 A,2 A,2 :| AB | c2 ec cBeB | BAcA AGFE | FBBc dcBA | GABc B2 AB | c2 ec cBeB | 
 BAcA AGFE | FBBc dBAG | A2 A,2 A,2 AB | c2 ec cBeB | BAcA AGFE | FBBc dcBA | GABc B2 AB | 
 c2 ac B2 gB | A2 fa AGFE | FBBc dBAG | A2 AA A2 || fg | a2 A,A, A,B,CD | EDCB, A,3 g | agfe dcBA | 
 GABc B3 g | agfe dcBA | dcde fgaf | ecBA GABd |1 c2 AA A2 :|2 c2 A,A, A,2 ||  