Compose a piece of music that follows the specified structure and incorporates the given theme.
X:1
L:1/8
M:4/4
K:G
['gdB(G G)DAB cBAG =F3 E =FGAB cBAG', '=F3 d =F2 d=F E3 c E2', 'gdB(G G)DAB cBAG =F3 E =FGAB cBAG', 'dEcE =F2 AB cBAG (3Bcd'  
X:1
L:1/8
M:4/4
K:G
 f | gdB(G G)DAB | cBAG =F3 E | =FGAB cBAG | (3Bcd ef gdBd | gdB(G G)DAB | cBAG =F3 E | 
 =FGAB cBAG | (3Bcd AB G3 F || =F3 d =F2 d=F | E3 c E2 cE | =F2 AB cBAG | (3Bcd ef gdBG | 
 =F3 d =F2 d=F | E3 c E2 cE | =F2 AB cBAG | (3Bcd AB G3 F || gdB(G G)DAB | cBAG =F3 E | 
 =FGAB cBAG | (3Bcd (3Bcd gdBd | gdB(G G)DAB | cBAG =F3 E | =FGAB cBAG | (3Bcd AB G3 F || 
 =F2 c=F d=Fc=F | E2 cE dEcE | =F2 AB cBAG | (3Bcd ef gdBG | =F3 c d=Fc=F | E3 c dEcE | 
 =F2 AB cBAG | (3Bcd AB G3 F ||  