#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
#include <sstream>
using namespace std;
#define forr(a,b,c) for(int (a) = (b); (a) < (c); (a)++)
#define fore(a,b,c) for(int (a) = (b); (a) <= (c); (a)++)
#define forx(a,b,c) for(int (a) = (b); (a) > (c); (a)--)
int main ()
{
    ifstream in;
    in.open("DATA1.txt");
    ofstream out;
    out.open("OUT1.txt");
    int d, m, y;
    forr (q,0,5)
    {
         in >> d >> m >> y;
         if (y > 1997)
            out << "too young\n";
         else if (y < 1997)
            out << "old enough\n";
         else
         {
             if (m > 10)
                out << "too young\n";
             else if (m < 10)
                out << "old enough\n";
             else
             {
                if (d > 27)
                   out << "too young\n";
                else if (d <= 27)
                   out << "old enough\n";
             }  
         }
    }
    return 0;
}

