import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Main {
	private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS);
	private final static Matcher regex_match = Main.regex_pattern.matcher("");	
	
	private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd");
	public static String S;
	
	public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    }
	
	private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	}
} import java.text.SimpleDateFormat; SimpleDateFormat java.text import java.util.Date; Date java.util import java.util.Scanner; Scanner java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {
	private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS);
	private final static Matcher regex_match = Main.regex_pattern.matcher("");	
	
	private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd");
	public static String S;
	
	public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    }
	
	private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	}
} Main private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS); regex_pattern Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS) Pattern.compile Pattern "(\\d){4} \\/ (\\d){2} \\/ (\\d){2}" Pattern.COMMENTS Pattern Pattern.COMMENTS private final static Matcher regex_match = Main.regex_pattern.matcher(""); regex_match Main.regex_pattern.matcher("") Main.regex_pattern.matcher Main.regex_pattern Main Main.regex_pattern "" private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd"); SF new SimpleDateFormat("yyyy/MM/dd") public static String S; S public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    } main {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    } Date date2c = null; date2c null try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		} catch(Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			date2c = SF.parse("2019/04/30");
		} date2c = SF.parse("2019/04/30") date2c SF.parse("2019/04/30") SF.parse SF "2019/04/30" Scanner sc = new Scanner(System.in); sc new Scanner(System.in) S = sc.next().trim() S sc.next().trim() sc.next().trim sc.next() sc.next sc try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	} Exception e {
    		System.out.println("Invalid Input!");
    	} System.out.println("Invalid Input!") System.out.println System.out System System.out "Invalid Input!" {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} if(!validateInput(S)) { throw new Exception(); } !validateInput(S) validateInput(S) validateInput S { throw new Exception(); } throw new Exception(); new Exception() if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	} SF.parse(S).after(date2c) SF.parse(S).after SF.parse(S) SF.parse SF S date2c {
        		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" sc.close() sc.close sc String[] args args private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	} validateInput {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	} regex_match.reset(in) regex_match.reset regex_match in if(regex_match.matches()) {
			return true;
		} regex_match.matches() regex_match.matches regex_match {
			return true;
		} return true; true return false; false String in in public class Main {
	private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS);
	private final static Matcher regex_match = Main.regex_pattern.matcher("");	
	
	private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd");
	public static String S;
	
	public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    }
	
	private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	}
} public class Main {
	private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS);
	private final static Matcher regex_match = Main.regex_pattern.matcher("");	
	
	private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd");
	public static String S;
	
	public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    }
	
	private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	}
} Main
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Main {
	private final static Pattern regex_pattern = Pattern.compile("(\\d){4} \\/ (\\d){2} \\/ (\\d){2}", Pattern.COMMENTS);
	private final static Matcher regex_match = Main.regex_pattern.matcher("");	
	
	private final static SimpleDateFormat SF = new SimpleDateFormat("yyyy/MM/dd");
	public static String S;
	
	public static void main(String[] args) {		
		Date date2c = null;

		try {
			date2c = SF.parse("2019/04/30");
		}catch(Exception e) {
			e.printStackTrace();
		}
		
    	Scanner sc = new Scanner(System.in);
    	    	
    	S = sc.next().trim();
   
    	try {
        	if(!validateInput(S)) { throw new Exception(); }
        		

        	if(SF.parse(S).after(date2c)) {
        		System.out.println("TBD");
        	} else {
        		System.out.println("Heisei");
        	}
        	
        	sc.close();
    	} catch (Exception e) {
    		System.out.println("Invalid Input!");
    	}
    }
	
	private static boolean validateInput(String in) {
		regex_match.reset(in);
		
		if(regex_match.matches()) {
			return true;
		}
		
		return false;
	}
}
