#1 Uva10038 - Jolly Jumpers
#include <bits/stdc++.h>
using namespace std;
int main() {
int n,x;
while(cin>>n){
vector <int> a,b;
for(int i=0;i<n;i++){
cin>>x;
a.push_back(x);
}
bool ok=true;
for(int i=0;i<a.size()-1;i++)b.push_back(abs(a[i]-a[i+1]));
sort(b.begin(),b.end());
for(int i=0;i<b.size();i++)if(b[i]!=i+1)ok=false;
if(ok){
cout<<"Jolly"<<endl;
}else{
cout<<"Not jolly"<<endl;
}
}
}```