comefrom: <doocs>0899.Orderly Queue_1.py
code: def orderlyQueue( s: str, k: int) -> str:
      if k == 1:
          ans = s
          for _ in range(len(s) - 1):
              s = s[1:] + s[0]
              ans = min(ans, s)
          return ans
      return "".join(sorted(s))
masked: def sample_funcname ( var_0 : str , var_2 : int ) -> str :
      if var_2 == 1 :
          var_5 = var_0
          for var_8 in range ( len ( var_0 ) - 1 ) :
              var_0 = var_0 [ 1 : ] + var_0 [ 0 ]
              var_5 = min ( var_5 , var_0 )
          return var_5
      return "".join ( sorted ( var_0 ) )
  