Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/8
M:6/8
K:D
['d2 d']  
X:1
L:1/8
M:6/8
K:D
 A |"D" d2 d def | d2 d def |"A" ecA ABA |"A" ecA"^(G)" ABc |"D" d2 d def | d2 d def |"A" ecA ABc | 
"D" d3 d2 :: f |"D" a2 f a2 f | d2 d dfa |"G" b2 g b2 g |"^(A)" e2 e efg |"D" a2 f a2 f | 
 d2 d def |"A" ecA ABc |"D" d3 d2 :|  