Four. (50 points) A planet has 1000 cities $c_{1}$, $c_{2}, \cdots, c_{1000}$, and three airlines $X$, $Y$, and $Z$ provide flights between these cities. For any $1 \leqslant i<j \leqslant 1000$, exactly one airline operates a one-way flight from city $c_{i}$ to city $c_{j}$. Find the largest positive integer $n$, such that a traveler can always choose one of the airlines and complete a journey starting from a city, passing through $n-1$ cities (excluding the departure and arrival cities), and finally arriving at the $n$-th city.
Four, the maximum value of $n$ is 9.
For each city $c_{i}(i=1,2, \cdots, 1000)$, define a triplet of non-negative integers $\left(x_{i}, y_{i}, z_{i}\right)$ according to the following rules:

If there are no flights from company $X$ arriving at city $c_{i}$, set $x_{i}=0$; otherwise, there exists a largest positive integer $x_{i}$ such that there is a sequence of non-negative integers $k_{0}<k_{1}<\cdots<k_{x_{i}-1}<i$, satisfying that starting from city $c_{k_{0}}$, passing through cities $c_{k_{1}}, c_{k_{2}}$, $\cdots, c_{k_{x-1}}$ in sequence to reach $c_{i}$, and all routes belong to airline $X$.