def aa
    y,m,d = gets.chomp.split(/\//).map{|x| x.to_i}

    if y < 2019
        puts 'Heisei'
    elsif y == 2019 and m < 4
        puts 'Heisei'
    elsif y == 2019 and m == 4 and d < 31
        puts 'Heisei'
    else
        puts 'TBD'
    end
end

aa
