Craft a musical work based on the specified structure and given theme.
X:1
L:1/8
M:2/4
K:D
['A (Ad).d.d (df).f.f .e/.d/.e/.f/ .e.e .e3 (g/f/)', 'fa b/a/g/f/ eg a/g/f/e/', 'g2 f2', 'dcBA GFED A2 z2 |!p! (ge) z'  
X:1
L:1/8
M:2/4
K:D
 A | (Ad).d.d | (df).f.f | .e/.d/.e/.f/ .e.e | .e3 (g/f/) | .e(e/d/) .c(c/B/) | Agfe | 
 f/g/a/f/ dd | d3 :: a/g/ | fa b/a/g/f/ | eg a/g/f/e/ | d(e/f/) g/f/e/d/ | c(B/c/) A(a/g/) | 
 fa b/a/g/f/ | eg a/g/f/e/ | dg f/e/d/c/ | d3 :|[M:3/4]"^Trio"!p! !fermata!a2 g2 | f2 z2 | g2 f2 | 
 e2 z2 | g2 f2 | e2 z g | fdec | d2 z2 ::!f! A3 B/c/ | dcBA | GFED | A2 z2 |!p! (ge) z g | 
 (fd) z f | edec | d3 :|  