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 Bd egge']  
X:1
L:1/8
M:4/4
K:G
 d2 Bd egge | d2 BG AGEG | d2 Bd egge | agbg ageg | d2 Bd egge | d2 BG AGEG | d2 Bd egge | 
 dBAB G3 A | B2 B/B/B BAGA | B2 BG AGEG | B2 B/B/B BAGA | BGAF G2 GA | B2 B/B/B BAGA | B2 BG AGEG | 
 B2 B/B/B BAGA | BGAF G2 D/D/D | DGBG AGBG | DGBG AGEG | DGBG AGBd | gedB ABGE | DGBG AGBG | 
 DGBG AGEG | DGBG AGBd | gedB G4 |]  