Solve $\cos 3x = 1$ for $0 \le x \le 2 \pi.$  Enter all the solutions, separated by commas.
If $\cos 3x = 1,$ then $x$ must be an integer multiple of $2 \pi.$  In other words,
\[3x = 2n \pi\]for some integer $n.$  Then
\[x = \frac{2n \pi}{3}.\]The possible values of $x$ in the interval $0 \le x \le 2 \pi$ are then $\boxed{0, \frac{2 \pi}{3}, \frac{4 \pi}{3}, 2 \pi}.$