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
['D3 =F ^FA B2', 'edBA de=f^f- f a3 edBA B d2'  
X:1
L:1/8
M:4/4
K:D
"D" D3 =F ^FA B2 | d d2{=f} ^f edBA | D3 =F ^FA B2 |"A7" E E2 F E2 FE |"D" D3 =F ^FA B2 | 
 d d2{=f} ^f edBA | d2 B2"A7" AF E2 |1"D" D D2 D- D2 FE :|2"D" D D2 D- D2 e2 |: 
"D"{=f} ^f2{=f} ^f2 edBA | de=f^f- fABA |{=f} ^f2{=f} ^f2 edBA | defe-"A" eABA | 
"D"{=f} ^f2{=f} ^f2 edBA | de=f^f- f a3 |"Bm" bafd"A" edBA |"D" B d2 d- d4 :|  