Compose a piece following the given musical structure and incorporating the provided motif.
X:1
L:1/8
Q:1/4=120
M:2/2
K:G
['d2 c2 B2 G2', 'B g3 a g4 =f3 g fd'  
X:1
L:1/8
Q:1/4=120
M:2/2
K:G
"^Moderately Quick" [G,D]2- | [G,D]2 ED G2 [GB]2 | (BA) G2 AGED | =F2 [FA]2 F2 [FA]2 | dcBG AG E2 | 
 (D G2) A B2 c2 | d2 d2 d2 c2 | B2 G2 AGFD | G6 [G,D]2- | [G,D]2 G2 [GB]3 A | ([GB]A)GG AGED | 
 ([EA-] [=FA]3) [FA]3 c | dcdc AGED | G2 G4 AB | B2 c2 d3 e | d2 c2 B2 G2 |[M:3/2] AGFD G6 || 
 [GB]2- |[M:2/2] [GB]2 g2 [Bg]3 B | g3 a g4 | =f3 g fd c2 | d6 BA | G3 A B2 c2 | d3 e d2 c2 | 
 B2 G2 AGFD | G6 ||  