
    Given a vehicle's identifier number in the ride-sharing queue, determine the next optimal position by finding the smallest possible number greater than the current identifier that can be formed using the same digits. If no larger number can be formed with the same digits, return -1 to indicate the vehicle maintains its current position.
    

    
def rearrange_bigger(n):
    """
    Given a vehicle's identifier number in the ride-sharing queue, determine the next optimal position by finding the smallest possible number greater than the current identifier that can be formed using the same digits. If no larger number can be formed with the same digits, return -1 to indicate the vehicle maintains its current position.
    

    """
def rearrange_bigger(n):
    """
    Given a vehicle's identifier number in the ride-sharing queue, determine the next optimal position by finding the smallest possible number greater than the current identifier that can be formed using the same digits. If no larger number can be formed with the same digits, return -1 to indicate the vehicle maintains its current position.
    

    """
    nums = list(str(n))
    for i in range(len(nums) - 2, -1, -1):
        if nums[i] < nums[i + 1]:
            z = nums[i:]
            y = min(filter(lambda x: x > z[0], z))
            z.remove(y)
            z.sort()
            nums[i:] = [y] + z
            return int(''.join(nums))
    return False