Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:4/4
K:D
['d2 cecA d2 fd A2 ef'  
X:1
L:1/8
M:4/4
K:D
 A2 |"D" d2 d2"A" cecA |"D" d2 fd A2 ef |"G" g2 gf"E" e2 ed |"A" cedB ABcA |"D" d2 d2"A" cecA | 
"D" d2 fd A2 ef |"G" gfge"A" cABc |"D" d2"A" z2"D" d2 :: AG |"D" FAFA dAFA |"D" AGFG"A" E2 F2 | 
"G" GBGB"E" edcd |"A" cAB^G ABA=G |"D" FAFA dAFA |"G" GBGB dBGB |"A" cged cABc | 
"D" d2"A" f2"D" d2 :|  