Construct a musical piece that follows the designated lettered structure and integrates the provided motif throughout.
X:1
L:1/4
M:6/4
K:A
['a g2 e', 'A c2 f ^d2 B B2 e', 'e3/2 d/ c']  
X:1
L:1/4
M:6/4
K:A
|: a2 a g2 e | e2 a g2 e | e3/2 f/ g a2 A | A3/2 B/ c B2 A :| c2 f ^d2 B | B2 e ^d2 f | 
 f3/2 g/ a b2 e | e3/2 f/ g f2 e |]: G2 B d3 | A2 c e3 | e3/2 d/ c e3/2 d/ c | e3/2 d/ c B2 A :|  