input: Write a function to determine the maximum chain length that can be formed from a given collection of pairs.
  assert find_longest_chain([Pair(5, 24), Pair(15, 25), Pair(27, 40), Pair(50, 60)], 4) == 3
  assert find_longest_chain([Pair(1, 2), Pair(3, 4), Pair(5, 6), Pair(7, 8)], 4) == 4
  assert find_longest_chain([Pair(19, 10), Pair(11, 12), Pair(13, 14), Pair(15, 16), Pair(31, 54)], 5) == 5
output: def find_longest_chain(pairs, n):
      pairs.sort(key=lambda x: x.second)
      longest_chain = 1
      current_end = pairs[0].second
      for i in range(1, n):
          if pairs[i].first > current_end:
              longest_chain += 1
              current_end = pairs[i].second
      return longest_chain