Craft a musical piece that abides by the prescribed structural guidelines and the given theme.
X:1
L:1/4
M:4/4
K:D
['B A']  
X:1
L:1/4
M:4/4
K:D
 D | A F D A | B B A A | B c d c | B B A F | B A G F | E2 D D | A F D A | B B A A | B c d c | 
 B B A F | B A G F | E2 D z | A2 F2 | A2 F2 | G F E F | G F E F | G F E2 | D2 d c | B A G F | 
 E2 D |]  