#include <algorithm>
#include <cstdio>
#include <cstdlib>

using namespace std;

int main() {
  char *line = nullptr;
  size_t buffer_size;
  while (getline(&line, &buffer_size, stdin) > 0) {
    int cards[5];
    sscanf(
        line, "%d,%d,%d,%d,%d",
        cards, cards + 1, cards + 2, cards + 3, cards + 4);
    sort(cards, cards + 5);
    int counts[14] = {};
    for (auto card : cards) { ++counts[card]; }

    int pairs[2] = {};
    int three_card = 0, four_card = 0;
    for (int card = 1; card <= 13; ++card) {
      switch (counts[card]) {
        case 2:
          pairs[pairs[0] ? 1 : 0] = card;
          break;
        case 3:
          three_card = card;
          break;
        case 4:
          four_card = card;
          break;
        default:
          break;
      }
    }

    bool trivial_straight = true;
    for (int i = 0, head = cards[0]; i < 5; ++i) {
      if (cards[i] != head + i) {
        trivial_straight = false;
        break;
      }
    }
    bool straight_with_tailing_ace = cards[0] == 1;
    for (int i = 1; i < 5; ++i) {
      if (cards[i] != 10 - 1 + i) {
        straight_with_tailing_ace = false;
        break;
      }
    }
    bool straight = trivial_straight or straight_with_tailing_ace;

    int num_pairs = (pairs[0] ? 1 : 0) + (pairs[1] ? 1 : 0);

    const char *character = "null";
    if (four_card) { character = "four card"; }
    else if (three_card and num_pairs == 1) { character = "full house"; }
    else if (straight) { character = "straight"; }
    else if (three_card) { character = "three card"; }
    else if (num_pairs == 2) { character = "two pair"; }
    else if (num_pairs == 1) { character = "one pair"; }
    puts(character);
  }
  free(line);

  return 0;
}