#include <bits/stdc++.h>
using namespace std;
int n, f;
int a[1005];
int main() {
const string mut = "olly";
string wil[2] = {"Not j", "J"};
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
a[i] = abs(a[i + 1] - a[i]);
sort(a, a + n);
if (a[n - 1] == n - 1) f = 1;
else f = 0;
cout << wil[f] << mut;
system("pause");
return 0;
}