Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
Q:1/4=80
M:3/8
K:G
['(B2 d) (d2 c) .e.d.^c (!^!d2 B)', '(Adf) (f/g/)!wedge!e!wedge!e']  
X:1
L:1/8
Q:1/4=80
M:3/8
K:G
"^Andante" !^!d>(^ce/)!wedge!d/ | (B2 d) | !wedge!g!wedge!B!wedge!e | (d2 c) | 
 !^!c>(Bc/)!wedge!A/ | !>!F2 !wedge!d | .e.d.^c | (!^!d2 B) | !^!d>(^ce/).d/ | (!>!B2 d) | gBe | 
 (!>!d2 c) | (!>!a2 g) | !wedge!f!wedge!e!wedge!d | (cBA) | G3!fine! || (A>B)!wedge!A/!wedge!^G/ | 
 (Adf) | (f/g/)!wedge!e!wedge!e | (e/f/)!wedge!d!wedge!d | !>!A>!wedge!B!wedge!A/!wedge!^G/ | 
 (Adf) | (f/g/)!wedge!e!wedge!e |"^AD LIB" (d/^c/e/d/=c/A/)!D.C.! |]  