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
['A3 B', 'BG G2 GEDG BGAB GEDG EAAG AEGA', 'G3 E DEGB dBGB AE E2', 'gede g2 ag egde'  
X:1
L:1/8
M:4/4
K:G
 egdB A3 B | G3 B A2 (3Bcd | e2 dB A3 B | GEDE GA (3Bcd | egdB A3 B | G3 B A2 (3Bcd | e2 dB AcBA | 
 GEDE GBdc || BG G2 GEDG | BGAB GEDG | EAAG AEGA | (3Bcd ed gedc | BG G2 GEDG | BGAB GEDG | 
 EAAG AEGA | (3Bcd ed gedB || G3 E DEGB | dBGB AE E2 | GAGE DEGF | GBdB (3ABA G2 | G3 E DEGB | 
 dBGB AE E2 | GFGE DEGF | GBdB (3ABA G2 || gede g2 ag | egde ge e2 | gede g2 ag | egde g3 a | 
 gede g2 ag | egde ge e2 | g3 e a2 ba | geeg b2 ag ||  