Design a musical work that abides by the outlined structure and integrates the assigned theme.
X:1
L:1/8
M:4/4
K:D
['', 'A2 A2', 'gfed cBAG FAdf'  
X:1
L:1/8
M:4/4
K:D
 (FG)S |] A2 A2 A2 (FA) | BcdB A2 (FG) | AFAF AFAF | GABG E2 (FG) | A2 A2 A2 (FA) | BcdB A2 d2 | 
 cdef gedc |1 dAFA DEFG :|2 d2 d2 d2 |: (de) | f2 f2 f2 (ef) | gfed cBAG | FAdf edcd | 
 efgf e2 (de) | fdfd fdfa |1 gfed cBAG | FAdf gedc | d2 d2 d2 :|2 bgec dcBA | FAdf gedc | 
 dAFA DEFGS |]  