#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
bool f = 0;
int main()
{
int n;
cin >> n;
vector<int> arr(n);
vector<int> arr1(n - 1);
for(int i = 0; i < n; i++)
{
cin >> arr[i];
}
for(int i = 0; i < n - 1; i++)
{
arr1[i] = abs(arr[i] - arr[i + 1]);
}
sort(arr1. begin(), arr1.end());
for(int i = 0; i < n - 1; i++)
{
if(arr1[i] != i + 1)
{
f = 1;
break;
}
}
if(f)
{
cout << "Not jolly\n";
}
else cout << " Jolly\n";
return 0;
}