def readdata():

    x = []

    try:

        while True:

            x.append(list(map(int,input().split(","))))

    except: return x



def checkhand2(hand):

    tmp = [(e+11)%13 for e in hand]

    x1=sorted(list(set(tmp)))

    x2=[]

    for e in x1:

        x2.append(tmp.count(e))

    return x1,x2



def isstraight(x1):

    if x1==[0,1,2,3,12]: return True

    e = x1[0]

    if x1==list(range(e,e+5)): return True

    else: return False



def checkhand(hand):

    x1,x2 = checkhand2(hand)

    x2 = sorted(x2)

    prize = 0

    if x2==[1,1,1,1,1]:

        if isstraight(x1): prize = 4

        else: prize = 0

    elif x2==[1,1,1,2]: prize = 1

    elif x2==[1,2,2]: prize = 2

    elif x2==[1,1,3]: prize = 3

    elif x2==[2,3]: prize = 5

    elif x2==[1,4]: prize = 6

    return prize



values=[2,3,4,5,6,7,8,9,10,11,12,13,1]

prize=["null","one pair","two pair","three card",

        "straight","full house","four card"]



hands = readdata()

for e in hands:

    print(prize[checkhand(e)])
prize=["null","one pair","two pair","three card",

        "straight","full house","four card"]



try:

    while True:

        hand = list(map(int,input().split(",")))

        x = sorted(list(set(hand)))

        a = len(x)

        b = max([hand.count(e) for e in x])

        if b==4: p=6

        elif b==3:

            if a==2: p=5

            else: p=3

        elif b==2:

            if a==3: p=2

            else: p=1

        elif b==1:

            e = x[0]

            if x==[1,10,11,12,13] or x==list(range(e,e+5)): p=4

            else: p=0

        print(prize[p])

except:

    pass
def readdata():
    x = []
    try:
        while True:
            x.append(list(map(int, input().split(","))))
    except:
        return x


def checkhand2(hand):
    tmp = [(e + 11) % 13 for e in hand]
    x1 = sorted(list(set(tmp)))
    x2 = []
    for e in x1:
        x2.append(tmp.count(e))
    return x1, x2


def isstraight(x1):
    if x1 == [0, 1, 2, 3, 12]:
        return True
    e = x1[0]
    if x1 == list(range(e, e + 5)):
        return True
    else:
        return False


def checkhand(hand):
    x1, x2 = checkhand2(hand)
    x2 = sorted(x2)
    prize = 0
    if x2 == [1, 1, 1, 1, 1]:
        if isstraight(x1):
            prize = 4
        else:
            prize = 0
    elif x2 == [1, 1, 1, 2]:
        prize = 1
    elif x2 == [1, 2, 2]:
        prize = 2
    elif x2 == [1, 1, 3]:
        prize = 3
    elif x2 == [2, 3]:
        prize = 5
    elif x2 == [1, 4]:
        prize = 6
    return prize


values = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]
prize = [
    "null",
    "one pair",
    "two pair",
    "three card",
    "straight",
    "full house",
    "four card",
]
hands = readdata()
for e in hands:
    print(prize[checkhand(e)])

prize = [
    "null",
    "one pair",
    "two pair",
    "three card",
    "straight",
    "full house",
    "four card",
]
try:
    while True:
        hand = list(map(int, input().split(",")))
        x = sorted(list(set(hand)))
        a = len(x)
        b = max([hand.count(e) for e in x])
        if b == 4:
            p = 6
        elif b == 3:
            if a == 2:
                p = 5
            else:
                p = 3
        elif b == 2:
            if a == 3:
                p = 2
            else:
                p = 1
        elif b == 1:
            e = x[0]
            if x == [1, 10, 11, 12, 13] or x == list(range(e, e + 5)):
                p = 4
            else:
                p = 0
        print(prize[p])
except:
    pass

-def readdata(): -    x = [] -    try: -        while True: -            x.append(list(map(int, input().split(",")))) -    except: -        return x - - -def checkhand2(hand): -    tmp = [(e + 11) % 13 for e in hand] -    x1 = sorted(list(set(tmp))) -    x2 = [] -    for e in x1: -        x2.append(tmp.count(e)) -    return x1, x2 - - -def isstraight(x1): -    if x1 == [0, 1, 2, 3, 12]: -        return True -    e = x1[0] -    if x1 == list(range(e, e + 5)): -        return True -    else: -        return False - - -def checkhand(hand): -    x1, x2 = checkhand2(hand) -    x2 = sorted(x2) -    prize = 0 -    if x2 == [1, 1, 1, 1, 1]: -        if isstraight(x1): -            prize = 4 -        else: -            prize = 0 -    elif x2 == [1, 1, 1, 2]: -        prize = 1 -    elif x2 == [1, 2, 2]: -        prize = 2 -    elif x2 == [1, 1, 3]: -        prize = 3 -    elif x2 == [2, 3]: -        prize = 5 -    elif x2 == [1, 4]: -        prize = 6 -    return prize - - -values = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1] -hands = readdata() -for e in hands: -    print(prize[checkhand(e)]) +try: +    while True: +        hand = list(map(int, input().split(","))) +        x = sorted(list(set(hand))) +        a = len(x) +        b = max([hand.count(e) for e in x]) +        if b == 4: +            p = 6 +        elif b == 3: +            if a == 2: +                p = 5 +            else: +                p = 3 +        elif b == 2: +            if a == 3: +                p = 2 +            else: +                p = 1 +        elif b == 1: +            e = x[0] +            if x == [1, 10, 11, 12, 13] or x == list(range(e, e + 5)): +                p = 4 +            else: +                p = 0 +        print(prize[p]) +except: +    pass