input: Write a python function called 'find_best_permutation' that takes an array 'nums' which is a permutation of [0, 1, 2, ..., n - 1]. The function should calculate the score of any permutation of [0, 1, 2, ..., n - 1] named 'perm' as follows:
  
  score(perm) = |perm[0] - nums[perm[1]]| + |perm[1] - nums[perm[2]]| + ... + |perm[n - 1] - nums[perm[0]]|
  
  The function should return the permutation 'perm' that has the minimum possible score. If there are multiple permutations with the same minimum score, the function should return the lexicographically smallest one among them.
  
  Examples:
  >>> nums = [1,0,2]
  [0,1,2]
  >>> nums = [0,2,1]
  [0,2,1]
  
  Constraints:
  2 <= n == nums.length <= 14
  nums is a permutation of [0, 1, 2, ..., n - 1].
output: def find_best_permutation(nums):
      from itertools import permutations
      
      n = len(nums)
      min_score = float('inf')
      best_perm = None
      
      for perm in permutations(range(n)):
          score = sum(abs(perm[i] - nums[perm[(i + 1) % n]]) for i in range(n))
          if score < min_score or (score == min_score and perm < best_perm):
              min_score = score
              best_perm = perm
              
      return list(best_perm)