This class is on chess. Baby Volcano is playing a special chess game with his friend, Baby Evil.
In this chess game, there is a directed graph $G = (V,E)$. Vertices are indexed from $1$ to $n$. It is guaranteed that every vertex has at least one out-going edge, i.e. $\forall v\in V, \exists w\in V, (v,w)\in E$, Baby Volcano takes control of a subset of vertices $X\subseteq V$, Baby Evil takes control of $V\setminus X$. Every vertex $v$ is assigned a weight $W(v)$.
There is a chess, positioning at $s\in V$ initially. The game consists of three phases.
1. For every $p\in X$, Baby Volcano chooses an out-going edge $(p,q)\in E$ and delete other out-going edges of vertex $p$.
2. After Volcano's operation, Baby Evil would similarly choose an out-going edge $(p',q')\in E$ and delete other out-going edges of $p'$ for every $p' \notin X$. Both two babies make decisions based on chess's initial position $s$.
3. After two processes above, every vertex would remain only one out-going edge. The chess starts moving along the unique path in the processed graph, resulting in an infinite path $L = v_0v_1v_2\cdots$, where $v_0=s$. Baby Volcano gains score $CV$ at last, which is computed below:
$$CV:= \max\left\{W\left(v_i\right) \ |\ v_i \text{ appears in }L\right\}$$
Baby Volcano wants to maximize $CV$, while Baby Evil wants to minimize it.
Your task is to determine, for every $s,1\leq s\leq n$, compute $CV$ under the circumstance that the chess is put at $s$ initially.