Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
M:2/4
K:C
['|1 g2 g^f af g2 e4-'  
X:1
L:1/8
M:2/4
K:C
|:"C" cdeg- gage | agec- cd e2 |"F" FGAc- cdcA |"^(D)" dcAc- cdcA |"G" BdBG- G2 A^A | BdBG- G4 |1 
 g2 g^f af g2 |"C" e4- eged :|2 gdfd ec d2 |"C" c4- c2 g^g |:"A" agea- a/ g2 e | gea- a/ g2 e | 
"D" dcAd- d/ c2 A | dcAd- dcAc |"G" BdBG- G2 A^A | BdBG- GABd |1 g2 g^f af g2 |"C" e4- e2 g^g :|2 
 gdfd ec d2 |"C" (c4 z4) |]  