Construct a musical piece that integrates the provided motif and corresponds to the indicated musical structure.
X:1
L:1/8
Q:3/8=120
M:9/8
K:D
['a3 afd', 'ecA afd bge afd gec ABc'  
X:1
L:1/8
Q:3/8=120
M:9/8
K:D
{fg} a3 afd ecA |{fg} a3 afd bge |{fg} a3 afd ecA | Bdc{e} dcB AFD :: afd{e} (dcd) bge | 
 afd{e} dcd ecA | afd bge afd | gec ABc d3 :|  