#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
    int cards[5];
    char dummy;
    while (cin>>cards[0]>>dummy>>cards[1]>>dummy>>cards[2]>>dummy>>cards[3]>>dummy>>cards[4])
    {
        int count=0,ans=0;
        sort(cards,cards+5);
        for (int i=0; i<4; i++)
        {
            if ( cards[i] == cards[i+1] )
            {
                count++;
                ans+=count;
            }
            else count=0;
        }
        
        if (ans==0)
        {
            int sum=0;
            for (int i=0; i<5; i++) sum+=cards[i];
            if(sum-cards[0]*5==10) puts("straight");
            else if(cards[0]==1 && cards[1]==10 && cards[2]==11 && cards[3]==12 && cards[4]==13) puts("straight");
            else puts("null");
        }
        
        else if (ans==1) puts("one pair");
        else if (ans==2) puts("two pair");
        else if (ans==3) puts("three card");
        else if (ans==4) puts("full house");
        else if (ans==6) puts("four card");
        
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;

void print() { cout << endl; }
template <typename Head, typename... Tail>
void print(Head head, Tail... tail) {
    int size = sizeof...(Tail);
    cout << head;
    if (size > 0) {
        cout << " ";
    }
    print(tail...);
}

void print0() {}
template <typename Head, typename... Tail>
void print0(Head head, Tail... tail) {
    cout << head;
    print0(tail...);
}

struct xstruct {
    ll val;
};
bool operator<=(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val <= rhs.val;
}
bool operator<(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val < rhs.val;
}
bool operator>=(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val >= rhs.val;
}
bool operator>(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val > rhs.val;
}
bool operator==(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val == rhs.val;
}
bool operator!=(const xstruct& lhs, const xstruct& rhs) {
    return lhs.val != rhs.val;
}
ostream& operator<<(ostream& os, xstruct const& xst) {
    return os << xst.val;
}

int main() {
    string sa, sb;
    getline(cin, sa);
    getline(cin, sb);

    ll la = sa.length();
    ll lb = sb.length();

    // edit_distance
    vector<vector<ll>> edit_distance(la + 1, vector<ll>(lb + 1));
    for (ll a = 0; a <= la; a++) {
        for (ll b = 0; b <= lb; b++) {
            edit_distance[a][b] = -1;
        }
    }
    for (ll a = 0; a <= la; a++) {
        edit_distance[a][0] = a;
    }
    for (ll b = 0; b <= lb; b++) {
        edit_distance[0][b] = b;
    }
    for (ll a = 1; a <= la; a++) {
        for (ll b = 1; b <= lb; b++) {
            ll minval = la + lb;
            if (sa.at(a - 1) == sb.at(b - 1)) {
                minval = min(minval, edit_distance[a - 1][b - 1]);  // same
            }
            minval = min(minval, 1 + edit_distance[a - 1][b - 1]);  // replace
            minval = min(minval, 1 + edit_distance[a - 1][b]);      // insert
            minval = min(minval, 1 + edit_distance[a][b - 1]);      // delete
            edit_distance[a][b] = minval;
        }
    }

    print(edit_distance[la][lb]);
}

