input: Write a function that takes a string containing '*' characters and removes all '*' characters by deleting the leftmost '*' and the smallest non-'*' character to its left. If multiple smallest characters exist, any of them can be removed. Ensure the final string is lexicographically smallest.
output: def removeStars(s: str) -> str:
      stack = []
      for char in s:
          if char == '*':
              if stack:
                  min_index = min(range(len(stack)), key=lambda i: (stack[i], i))
                  stack.pop(min_index)
          else:
              stack.append(char)
      return ''.join(stack)