import Foundation

extension String {
    func split(separator: String) -> [Int] {
        return self.componentsSeparatedByString(separator).map { Int($0)! }
    }
}

let S = readLine()!.split("/")
let y = S[0]
let m = S[1]
let d = S[2]

var result = "TBD"
if y < 2019 {
    result = "Heisei"
} else if y == 2019 {
    if m < 4 {
        result = "Heisei"
    } else if m == 4 {
        if d <= 30 {
            result = "Heisei"
        }
    }
}

print(result)