Scooby-Doo

Program time limit: 1 second

Program memory limit: 512 MB

Scooby-Doo and the gang are trapped in a forest. The forest is made up of clearings and there are narrow paths between some clearings going in only 1 direction. The gang walks through the forest but after some time are suspicious they are walking in circles! Given the gang's starting location, determine if it's possible that they have ended up somewhere they've already been (not necessarily the start).

Input

The first line contains 2 positive integers $n, m$, representing the number of clearings in the forest and the number of paths respectively. The next $m$ lines each contain 2 positive separated integers $i, j$, representing a path from clearing $i$ to clearing $j$ (that cannot be traversed from $j$ to $i$). The next line contains a positive integer $s$, representing the gang's starting location.

Constraints

For all test cases, $1 \le n \le 100,000$, $1 \le m \le 200,000$.
$1 \le i, j \le n$.
$1 \le s \le n$.

Output

Print "Ruh-roh! Circles!" if the they could be walking in circles, otherwise print "Keep going, gang!".

Sample Input 1

5 5
1 2
2 3
3 4
4 2
2 5
1

Sample Output 1

Ruh-roh! Circles!

Explanation

Starting at 1, the gang could have moved 1->2->3->4->2, and so it is possible that they ended up in a clearing they've already reached before.

Scoring

Your program will be run on the 1 sample case and multiple secret test cases one after another, and if it produces the correct output for all test cases, it solves the task. Recall that your final score on the task is the score of your highest scoring submission.


Submit

Log in to submit!

Past submissions

You haven't submitted to this task.