Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
M:4/4
K:D
['GEDC D2', 'AdfA GBeG FAdf |1 gedc d2 g2'  
X:1
L:1/8
M:4/4
K:D
 d3 f ecAc | dBGB AFDF | G3 B AFDF |1 GEDC D2 A2 :|2 GEDC D2 g2 |: fafd ceac | BdgB AdfA | 
 GBeG FAdf |1 gedc d2 g2 :|2 gedc dABc ||  