Craft a musical piece that abides by the prescribed structural guidelines and the given theme.
X:1
L:1/16
M:2/4
K:D
['F>Ad>d d>dd>d', 'f>a^g>a b>ag>a e>a^g>a b>ag>a', 'd>fe>f e>fe>d ^c>de>c'  
X:1
L:1/16
M:2/4
K:D
 F>Ad>d d>dd>d | c>ea>a a>aa>a | a>gf>g e>fg>e | d>fe>d c>BA>G | F>Ad>d d>dd>d | A>cb>a a>aa>a | 
 a>gf>g e>fg>e | d>fe>c"^D.C." d4 |] f>a^g>a b>ag>a | e>a^g>a b>ag>a | f>a^g>a b>ge>d | 
 c>ef>e d>cB>A | f>a^g>a b>ag>a | e>a^g>a b>ag>a | f>af>a ^g>bg>b | aced cBA"^D.C."G |] 
[K:Dmin] d>fe>f e>fe>d | ^c>de>c d>ed>c | d>fe>f e>fe>d | ^c>de>c A4 | d>fe>f e>fe>d | 
 ^c>de>c d>ed>c | d>fe>f e>gf>e | dfe^c"^D.C." d4 |]  