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:G
['d2 dg', 'GG d2 de dBGB c2 e2 e2'  
X:1
L:1/8
M:4/4
K:G
 d2 (dg) edcB | d2 dg edcA | DGBG DGBG | DGBG cBAG | d2 dg edcB | d2 dg edcB | gfga ecAF | G2 GG :: 
 d2 de dBGB | c2 e2 e2 AB | c2 cd cBAG | cdef g2 ga | fdeg fdeg | gfga gfgg | ecAF G2 GG | G4 :|  