output_description: Print `Heisei` if the date represented by S is not later than April 30, 2019,
  and print `TBD` otherwise.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: # N A B C
  # l1
  # l2
  # ...
  
  (N, A, B, C) = (int(input().split()[i]) for i in range(4))
  L = []
  for i in range(N):
      l = int(input())
      L.append(l)
  # N = 5
  # A = 100
  # B = 90
  # C = 80
  # L = [98, 40, 30, 21, 80]
  
  
  def recur_function(a, b, c, n):
      if n == N:
          return abs(a - A) + abs(b - B) + abs(c - C) if min(a, b, c) > 0 else 10**9
      ret0 = (
          recur_function(a + L[n], b, c, n + 1) + 10
          if a > 0
          else recur_function(a + L[n], b, c, n + 1)
      )
      ret1 = (
          recur_function(a, b + L[n], c, n + 1) + 10
          if b > 0
          else recur_function(a, b + L[n], c, n + 1)
      )
      ret2 = (
          recur_function(a, b, c + L[n], n + 1) + 10
          if c > 0
          else recur_function(a, b, c + L[n], n + 1)
      )
      ret3 = recur_function(a, b, c, n + 1)
      return min(ret0, ret1, ret2, ret3)
  
  
  print(recur_function(0, 0, 0, 0))
  
problem_description: Statement
  
  You are given a string S as input. This represents a valid date in the year
  2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented
  as `2019/04/30`.)
  
  Write a program that prints `Heisei` if the date represented by S is not later
  than April 30, 2019, and prints `TBD` otherwise.
samples: [{"input": "2019/04/30", "output": "Heisei\n    \n\n* * *"}, {"input": "2019/11/01", "output": "TBD"}]