Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
M:4/4
K:G
['A<A B>G A<A g>f e<e d>B']  
X:1
L:1/8
M:4/4
K:G
 G3 E DEGA | B<B B>A G3 B | A<A B>G A<A g>f | e<e d>B A2 (AB) | d<d d<d BGGB | d<d d>B A2- A2 | 
 A<A B>G A<A g>f | e<e d>B A2- A2 ||  