Craft a musical piece that abides by the prescribed structural guidelines and the given theme.
X:1
L:1/8
M:9/8
K:D
['eee edc', 'e2 A AAA', 'aaa agf ecA'  
X:1
L:1/8
M:9/8
K:D
|: eee edc edc | eee edc efa | eee edc edc | d2 c BBB def :: e2 A AAA edc | e2 A AAA def | 
 e2 A AAA edc | BBB f2 B def :: aaa agf ecA | aaa a2 e f2 e | aaa agf ecA | BBB f2 B def :|  