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