#include <cstdio>#include <cmath>#include <cstring>usingnamespacestd;
intarray[3001];
intcount[3000];
intmain()
{
intn;
while (scanf("%d", &n) !=EOF)
{
memset(count, 0, sizeof(count));
for (inti=0; i<n; i++)
{
scanf("%d", &array[i]);
}
intflag=0;
for (inti=1; i<n; i++)
{
inttemp= (int)(fabs(array[i] -array[i-1]));
if (temp>0&&temp<n)
count[temp]++;
else {
flag=1;
break;
}
}
if (flag)
printf("Not jolly/n");
else {
for (inti=1; i<n; i++)
{
if (count[i] !=1)
{
flag=1;
break;
}
}
if (flag)
printf("Not jolly/n");
elseprintf("Jolly/n");
}
}
return0;
}