input: Write a python function to find the nearest 3 perfect squares less than or equal to a given number.
  assert findNearestSquares(30) == [9, 16, 25]
  assert findNearestSquares(50) == [16, 25, 36]
  assert findNearestSquares(100) == [49, 64, 81]
output: def findNearestSquares(n):
      import math
      nearest_squares = []
      i = int(math.sqrt(n))
      while len(nearest_squares) < 3 and i > 0:
          square = i * i
          if square <= n:
              nearest_squares.insert(0, square)
          i -= 1
      return nearest_squares