Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), ",")
		cards := make([]int, 5)
		for i :=range input {
			cards[i], _ = strconv.Atoi(input[i])
		}
		sort.Sort(sort.IntSlice(cards))
		if cards[0] == cards[1] && cards[2] == cards[3] && cards[2] == cards[1] {
			fmt.Println("four card")
		} else if cards[1] == cards[2] && cards[3] == cards[4] && cards[3] == cards[2]{
			fmt.Println("four card")
		} else if cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13 {
			fmt.Println("straight")
		} else if cards[0]+1 == cards[1] && cards[1]+1 == cards[2] && cards[2]+1 == cards[3] && cards[3]+1 == cards[4] {
			fmt.Println("straight")
		} else if (cards[0] == cards[1] && cards[1] == cards[2]) || (cards[1] == cards[2] && cards[2] == cards[3]) || (cards[2] == cards[3] && cards[3] == cards[4]) {
			fmt.Println("three card")
		} else if ((cards[0] == cards[1]) && ((cards[2] == cards[3]) || (cards[3] == cards[4]))) || ((cards[1] == cards[2]) && (cards[3] == cards[4])) {
			fmt.Println("two pair")
		} else if cards[0] == cards[1] || cards[1] == cards[2] || cards[2] == cards[3] || cards[3] == cards[4] {
			fmt.Println("one pair")
		} else {
			fmt.Println("null")
		}
	}
}

Python: # AOJ 0038: Poker Hand
# Python3 2018.6.27 bal4u

def judge(card, cnt):
	nmax = cnt[0][1]
	if nmax == 4: return "four card"
	if nmax == 3: return "full house" if cnt[1][1] == 2 else "three card"
	if nmax == 2: return "two pair" if cnt[1][1] == 2 else "one pair"
	if (card[0] == 1 and list(range(10, 14)) == card[1:]) \
		or list(range(card[0], card[0]+5)) == card: return "straight"
	return "null"

import collections
while True:
	try: card = list(map(int, input().split(',')))
	except: break
	cnt = collections.Counter(card)
	print(judge(sorted(card), sorted(cnt.items(), key=lambda x: -x[1])))

Python: while 1:
    try:
        hand=list(map(int,input().split(",")))
        hand.sort()
        if len(list(set(hand)))==2:
            if hand.count(hand[0])==4 or hand.count(hand[4])==4:print("four card")
            else:print("full house")
        elif hand[0]+1==hand[1] and hand[1]+1==hand[2] and hand[2]+1==hand[3] and hand[3]+1==hand[4]:print("straight")
        elif hand[0]==1 and hand[1]==10 and hand[2]==11 and hand[3]==12 and hand[4]==13:print("straight")
        elif len(list(set(hand)))==3:
            if hand.count(hand[0])==3 or hand.count(hand[2])==3 or hand.count(hand[4])==3:print("three card")
            else:print("two pair")
        elif len(list(set(hand)))==4:print("one pair")
        else:print("null")        
    except:break

Python: import sys
for e in sys.stdin:
 e=sorted(map(int,e.split(',')))
 print([['null','straight'][e[0]*10==e[1]or e[4]-e[0]==4],'one pair','two pair','three card','full house',0,'four card'][sum(e.count(s)for s in e)//2-2])

Python: def s(n):
    sum=0
    for i in range(14):
        if n[i] == 1 : sum+=i
    if sum % 5 == 0 or sum == 47: return True
    return False

while True:
    try:
        l=map(int, input().split(","))
    except:
        break

    n=[0]*14
    for i in l:
        n[i]+=1

    if 4 in n:
        print("four card")
    elif 3 in n and 2 in n:
        print("full house")
    elif 3 in n:
        print("three card")
    elif 2 == n.count(2):
        print("two pair")
    elif 2 in n:
        print("one pair")
    elif s(n):
        print("straight")
    else:
        print("null")

Python: def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())

for l in range(len(N)):
    table = [0 for i in range(15)]
    cards = [int(i) for i in N[l].split(",")]
    for i in range(5):
        table[cards[i]] += 1

    two,three,four,ren = 0,0,0,0
    for i in range(15):
        if table[i] == 2:
            two += 1
        elif table[i] == 3:
            three += 1
        elif table[i] == 4:
            four += 1

    for i in range(14):
        if table[i] == 1 and table[i+1] == 1:
            ren += 1
    if table[10] == 1 and table[11] == 1 and table[12] == 1 and table[13] == 1 and table[1] == 1:
        ren = 4
    ans = "null"
    if four == 1:
        ans = "four card"
    elif two == 1 and three == 1:
        ans = "full house"
    elif ren == 4:
        ans = "straight"
    elif three == 1:
        ans = "three card"
    elif two == 2:
        ans = "two pair"
    elif two == 1:
        ans = "one pair"
    print(ans)

Python: while 1:
	try: p=sorted(list(map(int,input().split(','))))
	except: break
	if (p[0] == p[3]) or (p[1] == p[4]): 
		print('four card')
	elif p[0] == p[2] or p[1] == p[3] or p[2] == p[4]:
		print('three card')
	elif (p[0] == p[2] and p[3] == p[4]) or (p[0] == p[1] and p[2] == p[4]):
		print('full house')
	elif (p[0] == p[1] and p[2] == p[3]) or (p[1] == p[2] and p[3] == p[4]):
		print('two pair')
	elif p[0] == p[1] or p[1] == p[2] or p[2] == p[3] or p[3] == p[4]:
		print('one pair')
	elif p[0] == p[1]-1 and p[1] == p[2]-1 and p[2] == p[3]-1 and p[3] == p[4]-1 and p[4] == p[3]+1:
		print('straight')
	elif p[0] == 1 and p[1] == 10 and p[2] == 11 and p[3] == 12 and p[4] == 13:
		print('straight')
	else:
		print('null')

Python: while 1:
	try: p=sorted(list(map(int,input().split(','))))
	except: break
	if (p[0] == p[3]) or (p[1] == p[4]): 
		print('four card')
	elif p[0] == p[2] or p[1] == p[3] or p[2] == p[4]:
		print('three card')
	elif (p[0] == p[1] == p[2] and p[3] == p[4]) or (p[0] == [1] and p[2] == p[3] == p[4]):
		print('full house')
	elif (p[0] == p[1] and p[2] == p[3]) or (p[1] == p[2] and p[3] == p[4]):
		print('two pair')
	elif p[0] == p[1] or p[1] == p[2] or p[3] == p[4]:
		print('one pair')
	elif (p[0] == p[1]-1) and (p[1] == p[2]-1) and (p[2] == p[3]-1) and (p[3] == p[4]-1) and  (p[4] == p[3]+1):
		print('straight')
	elif p[0] == 1 and p[1] == 10 and p[2] == 11 and p[3] == 12 and p[4] == 13:
		print('straight')
	else:
		print('null')

Python: import fileinput
from collections import Counter

for line in fileinput.input():
    if line == "\n":
        break
    else:
        card = [c for c in line.rstrip().split(",")]
        card_num = [int(c) for c in line.rstrip().split(",")]
        card_sort = sorted(card_num)
        counter = Counter(card)
        card_type = counter.most_common()
        if card_type[0][1] == 4:
            print("four card")
        elif card_type[0][1] == 3:
            if card_type[1][1] == 2:
                print("full house")
            else:
                print("three card")
        elif card_type[0][1] == 2:
            if card_type[1][1] == 2:
                print("two pair")
            else:
                print("one pair")
        elif card_sort == [1, 10, 11, 12, 13]:
            print("straight")
        else:
            for i in range(1, 5):
                if card_sort[0] + i == card_sort[i]:
                    f = "ok"
                else:
                    f = "no"
                    break
            if f == "ok":
                print("straight")
            else:
                print("nule")