#include<bits/stdc++.h>

using namespace std;

int main()
{
  string trump;
  while(getline(cin,trump)){  
    int two = 0; int three = 0; int four = 0;
    int a = 0;
    int b = 0;
    vector<int> poker;
    int check[15] = {0};
    int ans = 0;

    for(char e : trump){
      if(e == 49){
        if(b == 0){
          b = 1;
        }
        else{
          a = (e - 48) + 10;
          poker.push_back(a);
          b = 0;
        }
      }
      else if(48 <= e && 57 >= e && e != 49){
        if(b == 1){
          a = (e - 48) + 10;
          b = 0;
        }
        else{
          a = e - 48;
        }
        poker.push_back(a);
      }
      else{
        if(b == 1){
          poker.push_back(b);
          b = 0;
        }
      }
    }

    for(int e : poker){
      cout<<e<<endl;
    }
  
    if(b == 1){
      poker.push_back(b);
    }

    for(int e : poker){
      ++check[e];
    }

    check[14] = check[1];

    for(int i = 1;i < 14;++i){
      if(check[i] == 4){
        ++four;
      }
      else if(check[i] == 3){
        ++three;
      }
      else if(check[i] == 2){
        ++two;
      }
    }

    if(four == 1){
      cout<<"four card"<<endl;
      ans = 1;
    }
    else if(three == 1){
      ans = 1;
      if(two == 1){
        cout<<"full house"<<endl;
      }
      else{
        cout<<"three card"<<endl;
      }
    }
    else if(two == 2){
      ans = 1;
      cout<<"two pair"<<endl;
    }
    else if(two == 1){
      ans = 1;
      cout<<"one pair"<<endl;
    }
    else{
      for(int i = 1;i < 11;++i){
        if(check[i] == check[i+1] && check[i] == check[i+2] && check[i] == check[i+3] && check[i] == check[i+4] && check[i] != 0){
          cout<<"straight"<<endl;
          ans = 1;
          break;
        }
      }
    }

    if(ans == 0){
      cout<<"null"<<endl;
    }
  }
  return 0;
}
