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: a, b, q = map(int, input().split())
  sno = [-10e6] + [int(input()) for _ in range(a)] + [10e6]
  tno = [-10e6] + [int(input()) for _ in range(b)] + [10e6]
  dis = [int(input()) for _ in range q]
  
  for i in range(q):
   
      sl = 0
      sr = 0
      tl = 0
      tr = 0
   
      for j in range(a+2):
          if sno[j] >= dis[i]:
              sl = dis[i] - sno[j-1]
              sr = sno[j] - dis[i]
              break
          else:
              pass
   
      for k in range(b+2):
          if tno[k] >= dis[i]:
              tl = dis[i] - tno[k-1]
              tr = tno[k] - dis[i]
              break
          else:
              pass
   
      lds = max(sl, tl)
      rds = max(sr, tr)
      ans = min(lds, rds)
      print(ans)
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"}]