fun main(args: Array<String>) {
    val S = readLine()!!
    val y = S.take(4).toInt()
    val m = S.substring(5..6).toInt()
    val d = S.takeLast(2).toInt()
    val ans = when {
        y < 2019 -> "Heisei"
        y == 2019 -> when {
            m < 4 -> "Heisei"
            m == 4 -> when {
                d <= 30 -> "Heisei"
                else -> "TBD"
            }
            else -> "TBD"
        }
        else -> "TBD"
    }
    println(ans)
}