/* Written 7/26/06 by Ross Byers
 * Contains a solution to the contest problem lunch.doc
 */
 
 import java.lang.*;
 import java.util.*;
 import java.io.*;
 
 public class lunch
 {
 	public static void main(String[] args) throws IOException
 	{
 		Scanner inFile = new Scanner(new File("lunch.in"));
 		int n = inFile.nextInt();
 		for(;n>0;n--)
 		{
 			double lunchMoney = inFile.nextDouble();
 			if(lunchMoney<.5) System.out.println("GO HUNGRY");
 			else if(lunchMoney <= 2) System.out.println("VENDING MACHINES");
 			else if(lunchMoney <= 4) System.out.println("PRETZEL TIME");
 			else if(lunchMoney <= 5.5) System.out.println("SBARRO");
 			else System.out.println("SUBWAY");
 		}
		
		inFile.close();
 	}
 }