Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:2/2
K:D
['ef gf g2 Ac ag a2 Ac'  
X:1
L:1/8
M:2/2
K:D
|:"^(D)" DF Ad"D" fd fd |"A7" cd ec"D" dBAF |"D7" DFA=c"G" BGBG |"D" FG AF"A7" E2 FE | 
"^(D)" DF Ad"D" fd fd |"A7" cd ec"D" dB AF |"D7" DF A=c"G" BG Bd |"A7" cd ec"D" d2 d2 :: 
"A7" cd ef gf g2 | Ac e^g"D" ag a2 | Ac ef"A7" gf ge |"E7" df ed"A7" cB A2 |"A7" Ac ef gf g2 | 
 Ac e^g"D" ag a2 | Ac ef"G" gf ge |"A7" cd ec"D" d2 d2 :|  