Compose a piece of music that follows both the given musical theme and the letter-based structure provided.
X:1
L:1/8
M:4/4
K:D
['D2 FA dAFA', 'FGAB cdef e2 dcBdGB DGBd gfed edBd']  
X:1
L:1/8
M:4/4
K:D
 D2 FA dAFA | D2 FA dAFA | GBEG CDEF | GABc B2 AF | D2 FA dAFA | D2 FA dAFA | GBEG CDEF |1 
 GABc d4 :|2 GABc d2 d=c ||[K:G] BdGB DGBd | gfed edBd | ceAc FGAB | cdef e2 dcBdGB DGBd | 
 gfed edBd | ceAc FGAB |1 cdef g2 dc :| cdef g4 ||  