import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	}
} 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();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	} main {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int yyyy = Integer.parseInt(s.substring(0, 4)); yyyy Integer.parseInt(s.substring(0, 4)) Integer.parseInt Integer s.substring(0, 4) s.substring s 0 4 int mm = Integer.parseInt(s.substring(5, 7)); mm Integer.parseInt(s.substring(5, 7)) Integer.parseInt Integer s.substring(5, 7) s.substring s 5 7 int dd = Integer.parseInt(s.substring(8, 10)); dd Integer.parseInt(s.substring(8, 10)) Integer.parseInt Integer s.substring(8, 10) s.substring s 8 10 if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		} yyyy <= 2019 && mm <= 4 yyyy <= 2019 yyyy 2019 mm <= 4 mm 4 {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		} if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			} mm == 4 && dd > 30 mm == 4 mm 4 dd > 30 dd 30 {
				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" return; System.out.println("TBD") System.out.println System.out System System.out "TBD" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int yyyy = Integer.parseInt(s.substring(0, 4));
		int mm = Integer.parseInt(s.substring(5, 7));
		int dd = Integer.parseInt(s.substring(8, 10));
		if (yyyy <= 2019 && mm <= 4) {
			if (mm == 4 && dd > 30) {
				System.out.println("TBD");
			} else {
				System.out.println("Heisei");
			}
			
			return;
		}
		
		System.out.println("TBD");
	}
}
