import java.util.*;
import java.io.*;
import java.text.*;

class Main {

	void solve() {

		String s = in.next();
		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));
		
		if (y > 2019) {
			out.println("TBD");
			return;
		}
		
		if (m > 4) {
			out.println("TBD");
			return;
		}
		
		out.println("Heisei");
		
	}
	
	public static Scanner in = new Scanner(System.in);
	public static PrintWriter out = new PrintWriter(System.out);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} import java.util.*; util.* java import java.io.*; io.* java import java.text.*; text.* java class Main {

	void solve() {

		String s = in.next();
		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));
		
		if (y > 2019) {
			out.println("TBD");
			return;
		}
		
		if (m > 4) {
			out.println("TBD");
			return;
		}
		
		out.println("Heisei");
		
	}
	
	public static Scanner in = new Scanner(System.in);
	public static PrintWriter out = new PrintWriter(System.out);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} Main public static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) void solve() {

		String s = in.next();
		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));
		
		if (y > 2019) {
			out.println("TBD");
			return;
		}
		
		if (m > 4) {
			out.println("TBD");
			return;
		}
		
		out.println("Heisei");
		
	} solve {

		String s = in.next();
		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));
		
		if (y > 2019) {
			out.println("TBD");
			return;
		}
		
		if (m > 4) {
			out.println("TBD");
			return;
		}
		
		out.println("Heisei");
		
	} String s = in.next(); s in.next() in.next in int y = Integer.parseInt(s.substring(0, 4)); y Integer.parseInt(s.substring(0, 4)) Integer.parseInt Integer s.substring(0, 4) s.substring s 0 4 int m = Integer.parseInt(s.substring(5, 7)); m Integer.parseInt(s.substring(5, 7)) Integer.parseInt Integer s.substring(5, 7) s.substring s 5 7 int d = Integer.parseInt(s.substring(8, 10)); d Integer.parseInt(s.substring(8, 10)) Integer.parseInt Integer s.substring(8, 10) s.substring s 8 10 if (y > 2019) {
			out.println("TBD");
			return;
		} y > 2019 y 2019 {
			out.println("TBD");
			return;
		} out.println("TBD") out.println out "TBD" return; if (m > 4) {
			out.println("TBD");
			return;
		} m > 4 m 4 {
			out.println("TBD");
			return;
		} out.println("TBD") out.println out "TBD" return; out.println("Heisei") out.println out "Heisei" public static void main(String[] args) {
		new Main().solve();
		out.flush();
	} main {
		new Main().solve();
		out.flush();
	} new Main().solve() new Main().solve new Main() out.flush() out.flush out String[] args args
import java.util.*;
import java.io.*;
import java.text.*;

class Main {

	void solve() {

		String s = in.next();
		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));
		
		if (y > 2019) {
			out.println("TBD");
			return;
		}
		
		if (m > 4) {
			out.println("TBD");
			return;
		}
		
		out.println("Heisei");
		
	}
	
	public static Scanner in = new Scanner(System.in);
	public static PrintWriter out = new PrintWriter(System.out);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

}