#include #include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template constexpr T INF = ::numeric_limits::max()/32*15+208; vector v{20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; int main() { vector cnt(10); string s; cin >> s; for (auto &&i : s) { if(isdigit(i)) v[i-'0']--; } for (int i = 0; i < 10; ++i) { if(v[i] < 0) printf("%d", i); } for (int i = 0; i < 10; ++i) { if(v[i] > 0) printf(" %d", i); } puts(""); return 0; }