/**
 * Auto Generated Java Class.
 */
import java.awt.*;
import java.io.*;
  public class P1 {
  
  
  public static void main(String[] args) throws IOException { 
    String temp;
    BufferedReader in = new BufferedReader (new FileReader ("DATA1.txt"));
    PrintWriter out = new PrintWriter (new FileWriter ("OUT1.txt"));
    for (int x =0; x < 5; x++)
    {
      temp = in.readLine ();
      String [] bd = temp.split (" ");
      if ((2010 - Integer.parseInt (bd [2])>=13))
            {
        if (Integer.parseInt (bd [1]) <=10)
        {
          if (Integer.parseInt (bd [0])<=27)
            out.println ("old enough");
            else 
            out.println ("too young");
        }
          else 
            out.println ("too young");
      }
          else 
            out.println ("too young");
          
          
          }
     out.close ();
  }
  
  /* ADD YOUR CODE HERE */
  
}

