AMC 12B 2021 Spring (Problem 20)

Let Q(z)Q(z) and R(z)R(z) be the unique polynomials such that z2021+1=(z2+z+1)Q(z)+R(z)z^{2021}+1=(z^2+z+1)\,Q(z)+R(z) and the degree of RR is less than 22. What is R(z)R(z)?
(A)  -z\text{(A)}\;\text{-z}(B)  1\text{(B)}\;-1(C)  2021\text{(C)}\;2021(D)  z+1\text{(D)}\;\text{z+1}(E)  2z+1\text{(E)}\;\text{2z+1}