Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
Q:1/4=120
M:4/4
K:G
['d>c .B2 .B2 (B>AG)B .d2 .d2 (=f>ed)^f', 'd>e =f>e (3(dBA)', '(de) =f2 (3(edB) (g2 B2)'  
X:1
L:1/8
Q:1/4=120
M:4/4
K:G
"^Moderate""^A" | d>c | .B2 .B2 (B>AG)B | .d2 .d2 (=f>ed)^f |1 (g2 B2) (B>AG)B | (c4 d2) :|2 
 e>d BG A3 G | G4 !fermata!G2 |]"^B" || (de) | =f2 d2 f2 d>e | =f>e (3(dBA) B2 (de) | 
 =f2 (3(edB) (g2 B2) | c4{de}"^->A2" d2 |]  