// Arup Guha
// 2/9/2013
// Solution to 2010 MCPC Problem C: Voting

import java.util.*;

public class c {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		String s = stdin.next();

		// Process each case.
		while (!s.equals("#")) {

			// Count votes.
			int yes = 0, no = 0, absent = 0, present = 0;
			for (int i=0; i<s.length(); i++) {
				if (s.charAt(i) == 'Y') yes++;
				else if (s.charAt(i) == 'N') no++;
				else if (s.charAt(i) == 'P') present++;
				else absent++;
			}

			// Output result.
			if (absent >= yes+no+present)
				System.out.println("need quorum");
			else if (yes > no)
				System.out.println("yes");
			else if (no > yes)
				System.out.println("no");
			else
				System.out.println("tie");

			// Get next case.
			s = stdin.next();
		}
	}
}