#include <bits/stdc++.h>
using namespace std;
int a[1000],b[1000];
int main()
{
int n;
bool t=true;
cin >> n;
for (int i=1;i<=n;i++)
{
cin >> a[i];
}
for (int j=1;j<=n-1;j++)
{
int c=abs(a[j]-a[j+1]);
b[c]=c;
}
for (int k=1;k<=n-1;k++)
{
if (b[k]!=k)
{
t=false;
break;
}
}
if (t==true)
cout << "Jolly" << endl;
else
cout << "Not jolly" << endl;
return 0;
}