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:C
['eAB c2 d', 'eaa efg']  
X:1
L:1/8
M:4/4
K:C
[M:6/8][K:G] A da f ue[Q:1/8=160]"^A dorian" .g/f/ | eAB c2 d | edc BAG | eAB c2 d | eaa eaa | 
 eAB c2 d | edc BAG | ABA gfe | dcB A2 :| d | eaa efg | dec BAG | eaa efg | fed efg | eaa efg | 
 dec BAG | ABA gfe | dcB A2 :|  