#include #include #include using namespace std; int main() { vector odd, even; int num; while (cin >> num) { if (num % 2 == 0) even.push_back(num); else odd.push_back(num); } sort(odd.begin(), odd.end()); sort(even.begin(), even.end()); for (int x : odd) cout << x << " "; cout << endl; for (int x : even) cout << x << " "; cout << endl; return 0; }