import java.util.LinkedList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	}

} import java.util.LinkedList; LinkedList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				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 if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		} Integer.parseInt(S.substring(5, 7))>4 Integer.parseInt(S.substring(5, 7)) Integer.parseInt Integer S.substring(5, 7) S.substring S 5 7 4 {
			System.out.println("TBD");
		} System.out.println("TBD") System.out.println System.out System System.out "TBD" if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		} Integer.parseInt(S.substring(5, 7))<4 Integer.parseInt(S.substring(5, 7)) Integer.parseInt Integer S.substring(5, 7) S.substring S 5 7 4 {
			System.out.println("Heisei");
		} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		} if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			} Integer.parseInt(S.substring(8))<=30 Integer.parseInt(S.substring(8)) Integer.parseInt Integer S.substring(8) S.substring S 8 30 {
				System.out.println("Heisei");
			} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
				System.out.println("TBD");
			} 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) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	}

} Main
import java.util.LinkedList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		String S = sc.next();
		
		if (Integer.parseInt(S.substring(5, 7))>4) {
			System.out.println("TBD");
		} else if (Integer.parseInt(S.substring(5, 7))<4) {
			System.out.println("Heisei");
		} else {
			if (Integer.parseInt(S.substring(8))<=30) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
		 
	}

}
