It seems to be the list of all polynomials of degree less than $2$, with coefficients in $\mathbf Z/3\mathbf Z$ in the first case; of all polynomials of degree less than $3$, with coefficients in $\mathbf Z/2\mathbf Z$ in the second case.
Indeed, for the first case, a polynomial of degree less than $2$ has the form $a_0+a_1x$. Plug in the different possible values for the pairs $(a_0,a_1)$, getting
\begin{matrix}
(0,0)\to \color{red}{0}&(0,1)\to \color{red}{x}&(0,2)\to \color{red}{2x}\\
(1,0)\to \color{red}{1}&(1,1)\to \color{red}{1+x}&(1,2)\to \color{red}{1+2x}\\
(2,0)\to \color{red}{2}&(2,1)\to \color{red}{2+x}&(2,2)\to \color{red}{2+2x}
\end{matrix}
The second case goe along the same lines:
\begin{matrix}
&(0,0,1)&&(0,1,1)\\
&\color{red}{x^2} &&\color{red}{x+x^2}\\
(0,0,0)&&(0,1,0) \\
\color{red}{0}&&\color{red}{x}\\[2ex]
&(1,0,1)&&(1,1,1)\\
& \color{red}{1+x}&&\color{red}{1+x+x^2}\\
(1,0,0)&&(1,1,0)\\
\color{red}{1}&& \color{red}{1+x}
\end{matrix}