Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:9/8
K:D
['gfe{g} fB{G}B{g}', 'ec{d}A agf{g} efd{cd}'  
X:1
L:1/8
M:9/8
K:D
|:{a} gfe{g} fB{G}B{g} fB{G}B |{a} gfe{g} fB{G}B{g} fga | gfe{g} fB{G}B{g} fB{G}B | 
 agf{g} efd{cd} cBA ::{Gdc} d2 e{g} fdf{g} ec{d}A |{Gdc} d2 e{g} fed{g} fga | 
{Gdc} d2 e{g} fdf{g} ec{d}A | agf{g} efd{cd} cBA :|  