#include <algorithm>
#include <iostream>
#include <iterator>
#include <string>
using namespace std;
int main() {
string n;
cin >> n;
const auto digits = "0123456789"s;
sort(begin(n), end(n));
set_difference(cbegin(digits), cend(digits), cbegin(n), cend(n), ostream_iterator<char>(cout, " "));
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxzdHJpbmc+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgbjsKCQoJY2luID4+IG47CgkKCWNvbnN0IGF1dG8gZGlnaXRzID0gIjAxMjM0NTY3ODkiczsKCglzb3J0KGJlZ2luKG4pLCBlbmQobikpOwogICAgc2V0X2RpZmZlcmVuY2UoY2JlZ2luKGRpZ2l0cyksIGNlbmQoZGlnaXRzKSwgY2JlZ2luKG4pLCBjZW5kKG4pLCBvc3RyZWFtX2l0ZXJhdG9yPGNoYXI+KGNvdXQsICIgIikpOwp9