#include<iostream> #include<cmath> using namespace std; int main() { int n,b,s,a[3001]={}; cin>>n; cin>>b; for (int i=1;i<n;i++){ cin >> s; a[abs(s-b)]++; b=s; } for (int i=1;i<n;i++){ if (a[i]!=1){ cout << "Not jolly" << endl; return 0; } } cout << "Jolly" << endl; return 0; }