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
['f>d (3dcd']  
X:1
L:1/8
M:4/4
K:D
 f>d (3dcd A>dF>d | f>d (3dcd A>dF>d | B>G (3GGG D27/8G/B/G/ | (3Bcd c>e d>fa>g | 
 f>d (3dcd A>^GA>d | f>d (3dcd A>^GA>d | B>G (3GGG D>G (3GGG | (3Bcd c>e d>a | (3faf d>f a>^ga>f | 
 (3gbg e>g b>^ab>g | (3faf d>f b>agf | (3efe (3dcB A>a^g>a | f>A (3def a>ba>f | g>B (3efg b2 a>g | 
 f>a (3aaa b>g (3edc | d2 A2 D>a :|  