#include<bits/stdc++.h>
using namespace std;
int main(){
int a[1001]={};
bool b[1001]={};
int n=0;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
if(b[a[i]-a[i-1]]){
cout<<"Not jolly";
return 0;
}
}
for(auto i:b){
if(!i){
cout<<"Not jolly";
return 0;
}
}
cout<<"Jolly";
return 0;
}