Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/4
M:4/4
K:Bb
['d _d']  
X:1
L:1/4
M:4/4
K:Bb
 d | _d =d _c A | _c _d =d =e | d _d _c A | _c _d =d _d/=d/ | =e/d/ _d _c2 | d _d _c B | _c2 z2 | 
 d2 =e2 | _g4 | =e d _g e | g2 _g2 | g2 =e d | _d2 =e2 | d _d _c |]  