Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
M:4/4
K:D
['A d>efg a3 a']  
X:1
L:1/8
M:4/4
K:D
 d>e |"D" f2 A>B A3 d |"G" B>A B<d"A" e2 d>e |"D" f2 A2"G" g>fed |"A" B3 c"D" d2 :| A | 
"D" d>efg a3 a |"G" g>f e<d"A" e2 A2 |"D" d>efg"A" a3 g |"D" f3 g"A" a3 A |"D" d>efg a3 a | 
"G" b>agf"A" e2 d>e |"D" f3 a"G" gfed |"A" B3 c"D" d2 ||  