input: Write a Python function to determine the permutation of an array `nums`, which is a reorder of [0, 1, 2, ..., n - 1]. The scoring metric for any permutation `perm` is defined as:
  
  \[ \text{score(perm)} = |\text{perm}[0] - \text{nums}[\text{perm}[1]]| + |\text{perm}[1] - \text{nums}[\text{perm}[2]]| + \ldots + |\text{perm}[n - 1] - \text{nums}[\text{perm}[0]]| \]
  
  Return the permutation 'perm' with the lowest possible score. In the event of ties, return the lexicographically smallest permutation.
  
  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_optimal_permutation(nums):
      from itertools import permutations
      
      n = len(nums)
      perm_list = list(permutations(range(n)))
      
      def score(perm):
          return sum(abs(perm[i] - nums[perm[(i + 1) % n]]) for i in range(n))
      
      min_score = float('inf')
      best_perm = None
      
      for perm in perm_list:
          current_score = score(perm)
          if current_score < min_score:
              min_score = current_score
              best_perm = perm
          elif current_score == min_score:
              if perm < best_perm:
                  best_perm = perm
      
      return list(best_perm)
  