#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

vector<string> split(const string &str, char delim) {
	vector<string> res;
	size_t current = 0, found;
	while ((found = str.find_first_of(delim, current)) != string::npos) {
		res.push_back(string(str, current, found - current));
		current = found + 1;
	}
	res.push_back(string(str, current, str.size() - current));
	return res;
}

struct Card {
	int type;
	int num;
	Card(const int _type, const int _num) :type(_type), num(_num) {
		assert(type >= 0 && type <= 3);
		assert(num >= 1 && num <= 13);
	}
	Card() :type(-1), num(-1) {

	}
	bool operator <(const Card& c) {
		return num == c.num ? type < c.type : num < c.num;
	}
};
long long int powint(long long int a, long long int b) {
	assert(b >= 0);
	if (b == 0)return 1;
	if (b == 1)return a;
	long long int ans = 1;
	long long int aa = powint(a, b / 2);
	ans *= aa*aa;
	if (b % 2)ans *= a;
	return ans;
}
struct Poker {
	vector<Card>cards;
	const long long int rolevalue = 1e16;
	long long getnumpower(
		const vector<pair<int, int>>&numcount) {

		long long int apower = 0;
		for (int i = 0; i < numcount.size(); ++i) {
			apower += numcount[i].second*powint(100, numcount.size() - 1 - i);
		}
		return apower;
	}
	long long getpower() {
		sort(cards.begin(), cards.end());
		bool isflush = false;
		{
			const int type0 = cards[0].type;
			isflush =
				all_of(cards.begin(), cards.end(), [=](const Card&c) {return c.type == type0; });
		}
		bool isstraight = false;
		{
			const int amin = cards[0].num;
			int place = -1;
			isstraight =
				all_of(cards.begin(), cards.end(), [=, &place](const Card&c) {place++; return c.num == amin + place; });
			bool royalok = true;
			for (int i = 0; i < 5; ++i) {
				if (i != 0) {
					if (cards[i].num != 9 + i) {
						royalok = false;
						break;
					}
				}
				else {
					if (cards[i].num != 1) {
						royalok = false;
						break;
					}
				}
			}
			if (royalok) {
				isstraight = true;
			}
			if (isstraight) {
				int a = 0;
				a++;
			}
		}
		vector<pair<int, int>>numcount;
		{
			map<int, int>powermp =
			{
				{ 1,14 },
				{ 2,2 },
				{ 3,3 },
				{ 4,4 },
				{ 5,5 },
				{ 6,6 },
				{ 7,7 },
				{ 8,8 },
				{ 9,9 },
				{ 10,10 },
				{ 11,11 },
				{ 12,12 },
				{ 13,13 },
			};
			vector<int>allnumcount(13);
			for (int i = 0; i < cards.size(); ++i) {
				allnumcount[cards[i].num - 1]++;
			}
			for (int i = 0; i < 13; ++i) {
				if (allnumcount[i]) {
					numcount.emplace_back(allnumcount[i], powermp[i + 1]);
				}
			}
			sort(numcount.begin(), numcount.end(), greater<pair<int, int>>());
		}



		//straightflush
		if (isstraight&&isflush) {
			assert(numcount.size() == 5);
			if (cards[0].num == 1 && cards[1].num == 10)return 10 * rolevalue + 100;
			return 10 * rolevalue + cards[0].num;
		}

		//fourcard
		if (numcount[0].first == 4) {
			assert(numcount.size() == 2);
			return 9 * rolevalue + getnumpower(numcount);
		}

		//fullhouse
		if (numcount[0].first == 3 && numcount[1].first == 2) {
			assert(numcount.size() == 2);
			return 8 * rolevalue + getnumpower(numcount);
		}
		//flush
		if (isflush) {
			assert(numcount.size() == 5);
			return 7 * rolevalue + getnumpower(numcount);
		}
		//straight
		if (isstraight) {
			assert(numcount.size() == 5);
			if (cards[0].num == 1 && cards[1].num == 10)return 6 * rolevalue + 100;
			return 6 * rolevalue + cards[0].num;
		}
		//three of a kind
		if (numcount[0].first == 3) {
			assert(numcount.size() == 3);
			return 5 * rolevalue + getnumpower(numcount);
		}
		// two pair
		if (numcount[0].first == 2 && numcount[1].first == 2) {
			assert(numcount.size() == 3);
			return 4 * rolevalue + getnumpower(numcount);
		}
		//one pair
		if (numcount[0].first == 2) {
			assert(numcount.size() == 4);
			return 3 * rolevalue + getnumpower(numcount);
		}
		// no pair
		assert(numcount.size() == 5);
		return 2 * rolevalue + getnumpower(numcount);
	}
	Poker(vector<Card>_cards) :cards(_cards) {}
};
int main() {
	string st;
	map<int, string>mp;
	
	while (cin >> st) {
		vector<string>sts;
		sts = split(st, ',');
		vector<Card>cs;
		for (int i = 0; i < sts.size(); ++i) {
			int num = stoi(sts[i]);
			cs.push_back(Card(i%4, num));
		}
		Poker po(cs);
		int n = po.getpower() / po.rolevalue;
		mp[2] = "null";
		mp[3] = "one pair";
		mp[4] = "two pair";
		mp[5] = "three card";
		mp[6] = "straight";
		mp[8] = "full house";
		mp[9] = "four card";
		cout << mp[n] << endl;
	}
	return 0;
}