#include <bits/stdc++.h>
using namespace std;

int main() {
	
    // 2、一维数组的查找
    
    int n;
    cin >> n;

    int key = 108;

    int arr[100 + 1];
    memset(arr, 0, sizeof(arr)); 

    // 数组的批量读入
    for (int i = 1; i <= n; i++) {
        cin >> arr[i];
    }
    
    // (1) 顺序查找 
    
    bool found = false;
    for (int i = 1; i <= n; i++) {
        if (arr[i] == key) {
            found = true;
        }
    }
    if (found) {
        cout << "found" << endl;
    } else {
        cout << "not found" << endl;
    }
    
    // (2) 二分法查找
    
    bool found = false;
    int left = 1;
    int right = n;
    int mid;
    while (left <= right) {
        mid = (left + right) / 2;
        if (key == arr[mid]) {
            found = true;
            break;
        } else if (key < arr[mid]) {
            right = mid - 1;
        } else {
            left = mid + 1;
        }
    }
    if (found) {
        cout << "found" << endl;
    } else {
        cout << "not found" << endl;
    }   

	return 0;
}