import java.util.*; class EasyPoker { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Map cards = new HashMap<>(); for (int i = 0; i < 5; i++) { String draw = sc.next(); if (cards.containsKey(draw)) { cards.put(draw, cards.get(draw) + 1); } else { cards.put(draw, 1); } } String status = "NO HAND"; boolean contains3 = cards.containsValue(3); boolean contains2 = cards.containsValue(2); int size = cards.size(); if (contains3 && contains2) { status = "FULL HOUSE"; } else if (contains3) { status = "THREE CARD"; } else if (contains2 && size == 3) { status = "TWO PAIR"; } else if (contains2 && size == 4) { status = "ONE PAIR"; } System.out.println(status); } }