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
['G2 G2', 'f2 d>f'  
X:1
L:1/8
M:4/4
K:D
|: D (3EFG | A2 A2 A>FD>E | F2 F2 F3 G | A2 A>B A>FD>F | E2 E>^D E2 (3DEF | G2 G2 G>FE>F | 
 G2 G2 G3 B | A2 A>G F2 (3GFE | D2 d2 (D :: A) d>e | f2 d>f e2 c>e | d2 A2 A3 d | B2 ^A>B =A>Fd>e | 
 f2 d>f e>A (3cde | f2 (3def (3efe (3cde | d2 A2 d3 A | B2 ^A>B =A>F (3Bcd | (3efe d2 d :|  