modular arithmetic – Find a solution to a congruance within a specified range

My problem is to find all the integer solutions of the following conguence:


where $$p=q^2∗r^2∗y^4∗z^2∗(2∗w^4+2∗r^2∗w^4∗y^4∗z^2+r^2∗w^8∗y^4∗z^2+2) + q^2+ 2∗r^6∗w^4∗y^m∗z^6∗(w+w^2+1)∗(-w+w^2+1)∗ (-w^2+w^4+1)+ 2∗r^4∗y^8∗z^4∗(w^8+r^2∗y^4∗z^2+1)+ w∗z^2∗(2∗w^2+3∗w^3+2)+z^2+2∗a+2$$ where $m=12$ and all the variables are between $0$ and $3$. One way to do this is to calculate the values of $P$ for all the cases of its variables in the mentioned range.