parameters: (self, text)
return_statement: return "".join(stk)
docstring: :type text: str
          :rtype: str
docstring_summary: :type text: str
          :rtype: str
docstring_tokens: : type text : str : rtype : str
function: def smallestSubsequence(self, text):
          """
          :type text: str
          :rtype: str
          """
          count = collections.Counter(text)
  
          lookup, stk = set(), []
          for c in text:
              if c not in lookup:
                  while stk and stk[-1] > c and count[stk[-1]]:
                      lookup.remove(stk.pop())
                  stk += c
                  lookup.add(c)
              count[c] -= 1
          return "".join(stk)
function_tokens: def smallestSubsequence ( self , text ) : count = collections . Counter ( text ) lookup , stk = set ( ) , [ ] for c in text : if c not in lookup : while stk and stk [ - 1 ] > c and count [ stk [ - 1 ] ] : lookup . remove ( stk . pop ( ) ) stk += c lookup . add ( c ) count [ c ] -= 1 return "" . join ( stk )