#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n, a[1000], b[1000];
bool yes = true;
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[i];
}for(int i = 0; i < n - 1; i++){
b[i] = abs(a[i + 1] - a[i]);
}for(int i =0; i < n - 1; i++){
if(b[i] < b[i + 1]){
yes = false;
}
}if(yes == true){
cout << "Jolly";
}else{
cout << "Not jolly";
}
return 0;
}