Elbow feeling
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A sequence is considered "grouped" if it does not contain any pair of identical elements that are separated by at least one element with a different value.
For a given sequence of numbers, output "Grouped" if the sequence is grouped, and output "Nongrouped" if it is not.
The sequence will contain no more than 1000 elements. Each element in the sequence is a number with an absolute value not exceeding 10^17.
Input
The input consists of a single line containing the sequence of numbers, separated by spaces.
Output
The output should be a single line containing the answer to the problem.
Examples
Input #1
Answer #1
Submissions 406
Acceptance rate 23%