output_description: Print Q lines.
  
  The i-th line should contain the minimum number of times the tank needs to be
  fulled while traveling from Town s_i to Town t_i. If Town t_i is unreachable,
  the line should contain -1 instead.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M L
      A_1 B_1 C_1
      :
      A_M B_M C_M
      Q
      s_1 t_1
      :
      s_Q t_Q
attempt: input_list = input().split()
  town_num = int(input_list[0])
  road_num = int(input_list[1])
  tank_max = int(input_list[2])
  road_list = []
  for _ in range(road_num):
      road_list.append(input().split())
  query_num = int(input())
  query_list = []
  for _ in range(query_num):
      query_list.append(input().split())
  for query in query_list:
      sup_tank = 0
      tank = tank_max
      query[0] = int(query[0])
      query[1] = int(query[1])
      query = sorted(query)
      s_town = query[0]
      e_town = query[1]
      if road_list == []:
          print(-1)
          continue
      for road in road_list:
          if int(road[0]) == s_town:
              if tank < int(road[2]):
                  sup_tank += 1
                  tank = tank_max
              elif tank_max < int(road[2]):
                  print(-1)
                  break
              tank -= int(road[2])
              if int(road[1]) == e_town:
                  print(sup_tank)
                  break
              s_town = int(road[1])
  
problem_description: Statement
  
  There are N towns numbered 1 to N and M roads. The i-th road connects Town A_i
  and Town B_i bidirectionally and has a length of C_i.
  
  Takahashi will travel between these towns by car, passing through these roads.
  The fuel tank of his car can contain at most L liters of fuel, and one liter
  of fuel is consumed for each unit distance traveled. When visiting a town
  while traveling, he can full the tank (or choose not to do so). Travel that
  results in the tank becoming empty halfway on the road cannot be done.
  
  Process the following Q queries:
  
    * The tank is now full. Find the minimum number of times he needs to full his tank while traveling from Town s_i to Town t_i. If Town t_i is unreachable, print -1.
samples: [{"input": "3 2 5\n    1 2 3\n    2 3 3\n    2\n    3 2\n    1 3", "output": "0\n    1\n    \n\nTo travel from Town 3 to Town 2, we can use the second road to reach Town 2\nwithout fueling the tank on the way.\n\nTo travel from Town 1 to Town 3, we can first use the first road to get to\nTown 2, full the tank, and use the second road to reach Town 3.\n\n* * *"}, {"input": "4 0 1\n    1\n    2 1", "output": "-1\n    \n\nThere may be no road at all.\n\n* * *"}, {"input": "5 4 4\n    1 2 2\n    2 3 2\n    3 4 3\n    4 5 2\n    20\n    2 1\n    3 1\n    4 1\n    5 1\n    1 2\n    3 2\n    4 2\n    5 2\n    1 3\n    2 3\n    4 3\n    5 3\n    1 4\n    2 4\n    3 4\n    5 4\n    1 5\n    2 5\n    3 5\n    4 5", "output": "0\n    0\n    1\n    2\n    0\n    0\n    1\n    2\n    0\n    0\n    0\n    1\n    1\n    1\n    0\n    0\n    2\n    2\n    1\n    0"}]