Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
Q:1/8=300
M:4/4
K:D
['cdec defd A2 dc B2 gf edcB'  
X:1
L:1/8
Q:1/8=300
M:4/4
K:D
"D" defd"A" cdec |"A" defd A2 dc |"G" B2 gf edcB |"A" Aaab agfe |"D" defd"A" cdec |"A" defd A2 dc | 
"G" B2 gf edcB |1"A" Agec"D" d4 ||2"A" Agec"D" d2 :| e2 |"D" f2 fg fedc |"G" BA G2"Em" g3 f | 
"A" e2 ef edcB | Aaab agfe |"D" f2 fg fedc |"G" BA G2"Em" g3 f |"A" e2 ef edcB |1"A" Agec"D" d2 ||2 
"A" Agec"D" d4 :|  