#include <cstdio>
#include <algorithm>
using namespace std;

const char *solve(){
	int c[20] = {};
	int a;
	for(int i = 0; i < 5; ++i){
		if(scanf("%d,", &a) == EOF){ return 0; }
		++c[a];
	}
	c[14] = c[1];

	int mc = 0, ms = 0, p = 0;
	for(int i = 1; i < 14; ++i){
		mc = max(mc, c[i]);
		if(c[i] > 1){ ++p; }
		int s = 0;
		for(int j = 0; j < 5 && c[i + j]; ++j){
			++s;
		}
		ms = max(ms, s);
	}
	
	if(mc == 4){ return "four card"; }
	if(p > 1 && mc > 2){ return "full house"; }
	if(ms > 4){ return "straight"; }
	if(mc > 2){ return "three card"; }
	if(p > 1){ return "two pair"; }
	if(p){ return "one pair"; }
	return "null";
}

int main(){
	const char *ans;
	while(ans = solve()){
		puts(ans);
	}
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    int N; cin >> N;
    vector<int> primes;
    rep2(i, 2, 55555) {
        bool flag = true;
        rep(j, primes.size()) {
            if (i%primes[j] == 0) {
                flag = false;
                break;
            }
        }
        if (flag) primes.push_back(i);
    }
    vector<int> ans;
    rep(i, primes.size()) {
        if (primes[i]%5 == 1) ans.push_back(primes[i]);
    }
    rep(i, N) {
        if (i) cout << " ";
        cout << ans[i];
    }
    cout << endl;
}
