#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
for (string s; cin >> s; ) {
std::stable_partition(s.begin(), s.end(), [](char ch) { return ch != '0'; });
cout << s << endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewoJZm9yIChzdHJpbmcgczsgY2luID4+IHM7ICkgewoJCXN0ZDo6c3RhYmxlX3BhcnRpdGlvbihzLmJlZ2luKCksIHMuZW5kKCksIFtdKGNoYXIgY2gpIHsgcmV0dXJuIGNoICE9ICcwJzsgfSk7CgkJY291dCA8PCBzIDw8IGVuZGw7Cgl9Cn0=