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
['ef ge fg a2 gf']  
X:1
L:1/8
M:4/4
K:A
 ed | cB AB cd ef | ge fg a2 gf | cA dc(BA) GB | cA dc B2 ed | cB AB(cd) ef | ge fg a2 gf | 
 eA dc BA GB | Ac BG A3 A | fd fg aa gf | ed cd e3 A | fd fg a3 .a3 .a3 .gf | eA dc B2 (ed) | 
 cB AB cd ef | ge fg a2 gf | eA dc BA GB | Ac BG A2 ||  