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