// Arup Guha
// 6/18/2026
// Solution to Kattis Problem: Mylla
// https://open.kattis.com/problems/mylla2

using namespace std;
#include <bits/stdc++.h>

// All the ways to win.
const vector<vector<int>> PATHS = {{0,1,2},{3,4,5},{6,7,8},{0,3,6},{1,4,7},{2,5,8},{0,4,8},{2,4,6}};

string outcome(string& s);
bool same(string& s, int idx);

int main() {

    // Merge into one string.
    string s, t;
    cin >> s;
    for (int i=0; i<2; i++) {
        cin >> t;
        s = s + t;
    }

    // Ta da!
    cout << outcome(s) << endl;
    return 0;
}

// Returns the outcome of the game stored in s.
string outcome(string& s) {

    // Try each direction look for 3 'O's.
    for (int i=0; i<PATHS.size(); i++)
        if (same(s,i) && s[PATHS[i][0]] == 'O')
            return "Jebb";

    // What we answer in this case.
    return "Neibb";
}

// Returns true iff the three indexes in PATHS[idx] in s are the same.
bool same(string& s, int idx) {
    return s[PATHS[idx][0]] == s[PATHS[idx][1]] &&
           s[PATHS[idx][0]] == s[PATHS[idx][2]];
}
