Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/4
M:3/4
K:D
['A d', 'f f A f'  
X:1
L:1/4
M:3/4
K:D
|: A/4B/4c/ | d d/c/ d/e/ | f d d/B/ | A d F | A G F | E- E e/f/ | g/f/ e/d/ c/B/ | A B G | F G A | 
 d d/c/ d/e/ | f d d/B/ | A d F | A G F | E- E e/f/ | g/f/ e/d/ c/B/ | A B c | d2 :: a/g/ | f f A | 
 f f A | f g a | b a f | e e A | e e A | e f g | b a g | f f A | f f A | f g a | b a f | 
 e e/^d/ e/f/ | g/f/ e/d/ c/B/ | A B c | d2 :|  