#include using namespace std;#include #include #include #include int main(){ map m; int i; for (i = 0;i < 10; i++) { m['0' + i] = i; } string ss; vector vv; int sum; while (cin>>ss) { vv.clear(); sum = 0; for (i = 0;i <= ss.length();i++) { if (i==ss.length()||m[ss[i]] == 5) { if (i != 0&&m[ss[i -1]] != 5||i==ss.length()&&m[ss[i - 1]] != 5) vv.push_back(sum); sum = 0; } else { sum = sum * 10 + m[ss[i]]; } } sort(vv.begin(),vv.end()); cout< for(i = 1;i < vv.size(); i++) { cout<<" "< } cout< } //system ("pause"); return 0;}