output_description: Print the kyu M-kun has, as an integer. For example, if he has 8-kyu, print
  `8`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X
attempt: # Fast IO (only use in integer input)
  
  # import os,io
  # input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
  
  from copy import copy
  
  N = int(input())
  Resident = []
  for i in range(N):
      x, y, p = map(int, input().split())
      Resident.append((x, y, p))
  
  minCost = [-1] * (N + 1)
  
  preCalRange = 1 << N
  
  horizontalLineDistance = []
  verticalLineDistance = []
  
  for i in range(preCalRange):
      railRoad = []
      tmp = i
      for j in range(N):
          railRoad.append(tmp % 2)
          tmp //= 2
      minDistance = [-1] * N
      for j in range(N):
          minDistance[j] = min(abs(Resident[j][0]), abs(Resident[j][1]))
          for k in range(N):
              if (
                  railRoad[k] == 1
                  and abs(Resident[j][0] - Resident[k][0]) < minDistance[j]
              ):
                  minDistance[j] = abs(Resident[j][0] - Resident[k][0])
      horizontalLineDistance.append(copy(minDistance))
      minDistance = [-1] * N
      for j in range(N):
          minDistance[j] = min(abs(Resident[j][0]), abs(Resident[j][1]))
          for k in range(N):
              if (
                  railRoad[k] == 1
                  and abs(Resident[j][1] - Resident[k][1]) < minDistance[j]
              ):
                  minDistance[j] = abs(Resident[j][1] - Resident[k][1])
      verticalLineDistance.append(copy(minDistance))
  
  totalCases = 3**N
  
  for i in range(totalCases):
      railRoad = []
      tmp = i
      for j in range(N):
          railRoad.append(tmp % 3)
          tmp //= 3
      horizontalCount = 0
      verticalCount = 0
      numNewRailroad = 0
      for j in range(N):
          if railRoad[j] == 1:
              numNewRailroad += 1
              horizontalCount += 1 << j
          if railRoad[j] == 2:
              verticalCount += 1 << j
              numNewRailroad += 1
      minDistance = []
      for j in range(N):
          minDistance.append(
              min(
                  horizontalLineDistance[horizontalCount][j],
                  verticalLineDistance[verticalCount][j],
              )
          )
  
      cost = 0
      for j in range(N):
          cost += Resident[j][2] * minDistance[j]
      if minCost[numNewRailroad] == -1 or minCost[numNewRailroad] > cost:
          minCost[numNewRailroad] = cost
  for elem in minCost:
      print(elem)
  
problem_description: Statement
  
  M-kun is a competitor in AtCoder, whose highest rating is X.  
  In this site, a competitor is given a _kyu_ (class) according to his/her
  highest rating. For ratings from 400 through 1999, the following kyus are
  given:
  
    * From 400 through 599: 8-kyu
    * From 600 through 799: 7-kyu
    * From 800 through 999: 6-kyu
    * From 1000 through 1199: 5-kyu
    * From 1200 through 1399: 4-kyu
    * From 1400 through 1599: 3-kyu
    * From 1600 through 1799: 2-kyu
    * From 1800 through 1999: 1-kyu
  
  What kyu does M-kun have?
samples: [{"input": "725", "output": "7\n    \n\nM-kun's highest rating is 725, which corresponds to 7-kyu.  \nThus, `7` is the correct output.\n\n* * *"}, {"input": "1600", "output": "2\n    \n\nM-kun's highest rating is 1600, which corresponds to 2-kyu.  \nThus, `2` is the correct output."}]