// Arup Guha
// 6/13/2024
// Solution to Kattis Problem: Barcelona
// https://open.kattis.com/problems/barcelona

using namespace std;
#include <bits/stdc++.h>

int main() {

    // Get # of bags and the target bag.
    int n, target, tmp;
    cin >> n >> target;

    // Read numbers.
    for (int i=0; i<n; i++) {

        cin >> tmp;

        // Skip it, not your bag.
        if (tmp != target) continue;

        // Three options.
        if (i == 0) cout << "fyrst" << endl;
        else if (i == 1) cout << "naestfyrst" << endl;
        else cout << (i+1) << " " << "fyrst" << endl;

        // If we get here it's time to get out of the loop.
        break;
    }
    return 0;
}
