#include<bits/stdc++.h>
using namespace std;
int main(){
long long a[1005],c[1005];
long long n,temp;
long long j=1;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=0;i<n-1;i++){
temp=a[i]-a[i+1];
if(temp<0) temp=-temp;
c[i]=temp;
}
temp=1;
sort(c,c+n);
for(int i=1;i<n-1;i++){
if(c[i]!=temp) j=0;
temp++;
}
if(j==1) cout<<"Jolly";
else cout<<"Not jolly";
return 0;
}