
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    } main {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String time = sc.next(); time sc.next() sc.next sc int yyyy = Integer.valueOf(time.substring(0,4)).intValue(); yyyy Integer.valueOf(time.substring(0,4)).intValue() Integer.valueOf(time.substring(0,4)).intValue Integer.valueOf(time.substring(0,4)) Integer.valueOf Integer time.substring(0,4) time.substring time 0 4 int mm = Integer.valueOf(time.substring(5,7)).intValue(); mm Integer.valueOf(time.substring(5,7)).intValue() Integer.valueOf(time.substring(5,7)).intValue Integer.valueOf(time.substring(5,7)) Integer.valueOf Integer time.substring(5,7) time.substring time 5 7 int dd = Integer.valueOf(time.substring(8,10)).intValue(); dd Integer.valueOf(time.substring(8,10)).intValue() Integer.valueOf(time.substring(8,10)).intValue Integer.valueOf(time.substring(8,10)) Integer.valueOf Integer time.substring(8,10) time.substring time 8 10 if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        } 2019 < yyyy 2019 yyyy {
            System.out.println("TBD");
        } System.out.println("TBD") System.out.println System.out System System.out "TBD" if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        } 2019 == yyyy 2019 yyyy {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            } 4 < mm 4 mm {
                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" {
            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) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String time = sc.next();
        int yyyy = Integer.valueOf(time.substring(0,4)).intValue();
        int mm = Integer.valueOf(time.substring(5,7)).intValue();
        int dd = Integer.valueOf(time.substring(8,10)).intValue();
//        System.out.println(yyyy);
//        System.out.println(mm);
//        System.out.println(dd);

        if (2019 < yyyy) {
            System.out.println("TBD");
        } else if (2019 == yyyy) {
            if (4 < mm) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } else {
            System.out.println("Heisei");
        }

    }
}
