Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
M:6/8
K:D
['a2 ^g a2 b a>fd', "e e^de =d'c'b"  
X:1
L:1/8
M:6/8
K:D
 A2 | a2 ^g a2 b | a>fd Adf | e>^de b2 a | f3 d2 A | a2 ^g a2 b | a>fd A>df | e^de bac | d3 d2 || 
 e | e^de =d'c'b | c'2 a a^gf | feB B[^Ae]B | cec A2 e | e^de =d'c'b | ^bc'a a^gf | fec dBe | 
 Ace a2 ||  