#Lutece0508. 快乐的跳跃者

快乐的跳跃者

Migrated from Lutece 508 快乐的跳跃者

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

对于一个包含nn(n>0n>0)个元素的整数序列,如果序列中相邻元素之差的绝对值取遍从11n1n-1的所有整数,那么这个序列就叫做jolly jumper。例如:1 4 2 3 就是一个jolly jumper,因为相邻元素之差的绝对值分别为332211。写一个程序来判断一个序列是不是jolly jumper

Input

TT组测试数据。输入的第一行是数据组数TT,其后每一行是一组测试数据。每行包含一个整数nn(n300n\leq 300),然后是nn个整数,表示一个输入序列。

Output

对于输入的每一行,输出一行Jolly或者Not jolly来表示它是否为jolly jumper

Samples

2
4 1 4 2 3
5 1 4 2 -1 6
Jolly
Not jolly

Resources

From UVa