import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    }
} Main public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    } main {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    } int y y m m d; d BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        } catch (IOException e) {
            System.out.println(e);
        } IOException e {
            System.out.println(e);
        } System.out.println(e) System.out.println System.out System System.out e {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } String line = br.readLine(); line br.readLine() br.readLine br String[] tbcConnection = line.split("/"); tbcConnection line.split("/") line.split line "/" int cnt = 0; cnt 0 int ok_cnt = 0; ok_cnt 0 int end_flg = 0; end_flg 0 for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            } String tbc tbcConnection {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            } {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            } if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                } end_flg == 0 end_flg 0 {
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                } if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    } Integer.parseInt(tbc) < 2019 && cnt == 0 Integer.parseInt(tbc) < 2019 Integer.parseInt(tbc) Integer.parseInt Integer tbc 2019 cnt == 0 cnt 0 {
                        ok_cnt++;
                    } ok_cnt++ ok_cnt cnt++ cnt if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0 Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0 Integer.parseInt(tbc) > 2019 Integer.parseInt(tbc) Integer.parseInt Integer tbc 2019 cnt == 1 cnt 1 ok_cnt == 0 ok_cnt 0 {
                        System.out.println("TBD");
                        end_flg++;
                    } System.out.println("TBD") System.out.println System.out System System.out "TBD" end_flg++ end_flg if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0 Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0 Integer.parseInt(tbc) > 4 Integer.parseInt(tbc) Integer.parseInt Integer tbc 4 cnt == 2 cnt 2 ok_cnt == 0 ok_cnt 0 {
                        System.out.println("TBD");
                        end_flg++;
                    } System.out.println("TBD") System.out.println System.out System System.out "TBD" end_flg++ end_flg if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0 Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0 Integer.parseInt(tbc) > 30 Integer.parseInt(tbc) Integer.parseInt Integer tbc 30 cnt == 3 cnt 3 ok_cnt == 0 ok_cnt 0 {
                        System.out.println("TBD");
                        end_flg++;
                    } System.out.println("TBD") System.out.println System.out System System.out "TBD" end_flg++ end_flg if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            } end_flg == 0 end_flg 0 {
                System.out.println("Heisei");
            } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
                System.out.println();
            } System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    }
} public class Main {
    public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {

        int y, m, d;

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String line = br.readLine();

            String[] tbcConnection = line.split("/");
            int cnt = 0;
            int ok_cnt = 0;
            int end_flg = 0;
            for (String tbc : tbcConnection) {
                if (end_flg == 0){
                    if (Integer.parseInt(tbc) < 2019 && cnt == 0) {
                        ok_cnt++;
                    }

                    cnt++;



                    if(Integer.parseInt(tbc) > 2019 && cnt == 1 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 4 && cnt == 2 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    } else if (Integer.parseInt(tbc) > 30 && cnt == 3 && ok_cnt == 0) {
                        System.out.println("TBD");
                        end_flg++;
                    }
                }

            }

            if (end_flg == 0) {
                System.out.println("Heisei");
            } else {
                System.out.println();
            }


        } catch (IOException e) {
            System.out.println(e);
        }
    }
}
