import scala.io.Source.stdin

object Main {
  def hand(i:Int,j:Int,k:Int,l:Int,m:Int):String = {
    if( (j,k,l) == (i,i,i) || (k,l,m) == (j,j,j) ) "four card"
    else if( (j,l,m) == (i,k,k) || (j,k,m) == (i,i,l) ) "full house"
    else if( (j,k) == (i,i) || (k,l) == (j,j) || (l,m) == (k,k) ) "three card"
    else if( (j,l) == (i,k) || (j,m) == (i,l) || (k,m) == (j,l) ) "two pair"
    else if( i== j || j == k || k == l || l == m ) "one pair"
    else if( (i,j,k,l,m) == (i,i+1,i+2,i+3,i+4) || (i,j,k,l,m) == (1,10,11,12,13) ) "straight"
    else "null"
  }

  def main(args:Array[String]) = {
    stdin.getLines.foreach { s=>
      val l = s.split(",").map(_.toInt).sorted
      println(hand(l(0),l(1),l(2),l(3),l(4)))
    }
  }
}