fork download
  1. a = raw_input()
  2. b = map(int, a)
  3. n=[]
  4. while b:
  5. smallest = min(b)
  6. n.append(smallest)
  7. b.remove(smallest)
  8. print
  9. print ''.join(map(str, n))
Success #stdin #stdout 0.02s 6360KB
stdin
678352
stdout
235678