You are given a connected undirected graph with $$$n$$$ nodes and $$$m$$$ edges. Each node $$$u$$$ has an ordered list $$$l_u$$$ of its neighbors, and an arrow pointing to one of its neighbors $$$p_u$$$. Initially, $$$p_u$$$ is the first neighbor in $$$l_u$$$.
You start at node $$$s$$$, and repeat the following process infinitely many times:
- Let $$$v$$$ be the node at which you are currently located. Move from $$$v$$$ to $$$p_v$$$.
- Increment $$$p_v$$$ to the next neighbor in $$$l_v$$$ cyclically.
Consider the list $$$p_1, p_2, \cdots p_n$$$ over the course of this process, as well as the current node $$$c$$$. We call this a state.
Print any state that appears an infinite amount of times.
$$$n, m \leq 10^5$$$
it's just sitting there, all alone, it needs a hug :(
some more great problems from the Rutgers Programming Contests








:hug:
second :hug:
hungry arachnid is a good problem yayy