input: Write a function to output the top 3 numbers from an array of integers.
  assert top_three([7, 13, 5, 8, 50, 11, 64, 48])==[64, 50, 48]
  assert top_three([10, 20, 30, 40])==[40, 30, 20]
  assert top_three([5])==[5]
  assert top_three([])==[]
  assert top_three([1, 1, 1, 2, 2, 3])==[3, 2, 2]
output: def top_three(arr):
      if len(arr) == 0:
          return []
      elif len(arr) == 1:
          return [arr[0]]
      elif len(arr) == 2:
          return sorted(arr, reverse=True)
      else:
          return sorted(arr, reverse=True)[:3]