Let $n\ge 3$ be an integer. Prove that there exist positive integers $a_1, a_2, ..., a_n$ other than 1 such that $a_1a_2...\hat a_i...a_n \equiv 1 \pmod {a_i}$, for $i=1,2, ...n$. Here, $\hat a_i$ means the term $a_i$ is omitted.
I am having problems solving this question. I have tried small value since of $n$ up to 5 and honestly have no idea how to solve this rigorously. Help is appreciated thank you!