output_description: Print the correct choice.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A
      B
attempt: N, u, v = map(int, input().split())
  u -= 1
  v -= 1
  
  e_list = [[] for _ in range(N)]
  
  for _ in range(N - 1):
      a, b = map(int, input().split())
      a -= 1
      b -= 1
      e_list[a].append(b)
      e_list[b].append(a)
  
  
  def calc_depth_table(v):
      queue = [[v, None, 0]]
      depth_table = [0] * N
      depth_table[v] = 0
  
      while queue:
          cur, pre, depth = queue.pop()
          depth += 1
          for n in e_list[cur]:
              if n != pre:
                  queue.append([n, cur, depth])
                  depth_table[n] = depth
      return depth_table
  
  
  def calc_depth_table2(depth_from_v, u):
      queue = [[u, None, 0, depth_from_v[u], u]]
      depth_table = [0] * N
      depth_table[u] = (0, depth_from_v[u], u)
  
      while queue:
          cur, pre, depth, min_depth_from_v, min_depth_point = queue.pop()
          depth += 1
          for n in e_list[cur]:
              if n != pre:
                  depth2 = depth_from_v[n]
                  if min_depth_from_v > depth2:
                      new_min_depth = depth2
                      new_min_depth_point = n
                  else:
                      new_min_depth = min_depth_from_v
                      new_min_depth_point = min_depth_point
                  queue.append([n, cur, depth, new_min_depth, new_min_depth_point])
                  depth_table[n] = (depth, new_min_depth, new_min_depth_point)
      return depth_table
  
  
  depth_from_v = calc_depth_table(v)
  depth_from_u = calc_depth_table2(depth_from_v, u)
  
  # print(depth_from_v)
  # print(depth_from_u)
  
  max_count = 0
  for i in range(N):
      a_dist = depth_from_v[i]
      t_dist, a_hit_dist, hit_pos = depth_from_u[i]
      t_hit_dist = depth_from_u[hit_pos][0]
  
      # 	print(t_hit_dist, a_hit_dist)
      if t_hit_dist < a_hit_dist:
          # 		print(t_hit_dist, a_hit_dist)
          # 		if (a_hit_dist - t_hit_dist) % 2 == 1:
          if max_count < a_dist - 1:
              max_count = a_dist - 1
  # 			else:
  #
  
  print(max_count)
  
problem_description: Statement
  
  Takahashi is solving quizzes. He has easily solved all but the last one.
  
  The last quiz has three choices: 1, 2, and 3.
  
  With his supernatural power, Takahashi has found out that the choices A and B
  are both wrong.
  
  Print the correct choice for this problem.
samples: [{"input": "3\n    1", "output": "2\n    \n\nWhen we know 3 and 1 are both wrong, the correct choice is 2.\n\n* * *"}, {"input": "1\n    2", "output": "3"}]