#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        vector<int> card(5);
        if(!(cin >> card[0]))
            return 0;

        for(int i=1; i<5; ++i){
            char c;
            cin >> c >> card[i];
        }
        sort(card.begin(), card.end());

        vector<int> num(5, 0);
        for(int i=0; i<5; ++i){
            int j = i+1;
            while(j < 5 && card[j] == card[i])
                ++ j;
            ++ num[j-i];
            i = j-1;
        }

        if(num[4] == 1)
            cout << "four card" << endl;
        else if(num[3] == 1 && num[2] == 1)
            cout << "full house" << endl;
        else if(num[3] == 1)
            cout << "three card" << endl;
        else if(num[2] == 2)
            cout << "two pair" << endl;
        else if(num[2] == 1)
            cout << "one pair" << endl;
        else if(card[0] == 1 && card[1] + 3 == card[4])
            cout << "straight" << endl;
        else if(card[0] + 4 == card[4])
            cout << "straight" << endl;
        else
            cout << "null" << endl;
    }
}
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#define inf 0x3f3f3f3f
#define MAX(x,y) x=max(x,y)
using namespace std;
 
const int N=18;
const int M=32775;
 
int n,m,bin[N],num[M],ma[N][M],sum[M],f[N][M],g[M];
 
int read()
{
	int x=0,f=1;char ch=getchar();
	while (ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while (ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
 
int lowbit(int x)
{
	return x&(-x);
}
 
int main()
{
	n=read();m=read();
	bin[0]=1;
	for (int i=1;i<=n;i++) bin[i]=bin[i-1]*2,num[bin[i]]=i;
	int tot=0;
	for (int i=1;i<=m;i++)
	{
		int x=read()-1,y=read()-1,z=read();tot+=z;
		ma[x][bin[y]]=ma[y][bin[x]]=z;
	}
	for (int i=0;i<n;i++)
		for (int j=1;j<bin[n];j++)
			ma[i][j]=ma[i][j-lowbit(j)]+ma[i][lowbit(j)];
	for (int i=1;i<bin[n];i++) sum[i]=sum[i-lowbit(i)]+ma[num[lowbit(i)]][i-lowbit(i)];
	for (int i=0;i<n;i++)
		for (int j=0;j<bin[n];j++)
			f[i][j]=-inf;
	f[0][1]=0;
	for (int j=0;j<bin[n];j++)
		for (int i=0;i<n-1;i++)
		{
			if (f[i][j]<0) continue;
			for (int k=0;k<n;k++)
				if (!(j&bin[k])&&ma[i][bin[k]]) MAX(f[k][j+bin[k]],f[i][j]+ma[i][bin[k]]);
		}
	for (int i=0;i<bin[n];i++) g[i]=f[n-1][i];
	for (int i=1;i<bin[n];i++)
	{
		if (g[i]<0) continue;
		int r=i^(bin[n]-1);
		for (int s=r;s;s=(s-1)&r)
		{
			int mxv=0;
			for (int j=i;j;j-=lowbit(j)) mxv=max(mxv,sum[s+lowbit(j)]);
			MAX(g[i+s],g[i]+mxv);
		}
	}
	printf("%d",tot-g[bin[n]-1]);
	return 0;
}