Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
Q:1/8=100
M:4/4
K:D
['A2 A/B/c/d/ F2 AF EFED D2', 'B2 A2 AFAB d3 e fefg fedA'  
X:1
L:1/8
Q:1/8=100
M:4/4
K:D
"^moderate" DF | A2 A/B/c/d/ F2 AF | EFED D2 dB | AFDF ABAF | A4- A z A2 | A2 A/B/c/d/ F2 AF | 
 EFED D2 z F | B3 c dcB^A | B4- B2 || A2 | AFAB d3 e | fefg fedA | defA ABAF | A4- A z A2 | 
 A2 A/B/c/d/ F2 AF | EFED D2 dB | ABAF GFEF | D4- D z |]  