import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String y = s.substring(0, 4); y s.substring(0, 4) s.substring s 0 4 String m = s.substring(5, 7); m s.substring(5, 7) s.substring s 5 7 String d = s.substring(8, 10); d s.substring(8, 10) s.substring s 8 10 int ye = Integer.parseInt(y); ye Integer.parseInt(y) Integer.parseInt Integer y int mo = Integer.parseInt(m); mo Integer.parseInt(m) Integer.parseInt Integer m int da = Integer.parseInt(d); da Integer.parseInt(d) Integer.parseInt Integer d boolean tbd = true; tbd true if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
} ye <= 2018 ye 2018 {
			tbd = false;
		} tbd = false tbd false if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
} ye>=2020 ye 2020 {
	tbd=true;
} tbd=true tbd true if(mo<=4){
	tbd=false;

}else{
	tbd=true;
} mo<=4 mo 4 {
	tbd=false;

} tbd=false tbd false {
	tbd=true;
} tbd=true tbd true if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");} tbd {
			System.out.println("TBD");
		} System.out.println("TBD") System.out.println System.out System System.out "TBD" {System.out.println("Heisei");} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String y = s.substring(0, 4);
		String m = s.substring(5, 7);
		String d = s.substring(8, 10);

		int ye = Integer.parseInt(y);
		int mo = Integer.parseInt(m);
		int da = Integer.parseInt(d);

		boolean tbd = true;
		if (ye <= 2018) {
			tbd = false;
		}else if(ye>=2020){
	tbd=true;
}else if(mo<=4){
	tbd=false;

}else{
	tbd=true;
}
		if(tbd){
			System.out.println("TBD");
		}else{System.out.println("Heisei");}



	}
}