#include
#include
#include
#include
using namespace std;
list list1;
deque deque1;
deque deque2;
deque deque3;
void read()
{
int num;
while (cin >> num)
list1.push_back(num);
}
void judge()
{
list::iterator it1=list1.begin();
for ( it1; it1 !=list1.end(); it1++)
{
if ((*it1)%2==0)
{
deque1.push_back(*it1);
}
else
{
deque2.push_back(*it1);
}
}
}
void main()
{
read();
judge();
deque::iterator it2 = deque1.begin();
deque::iterator it3 = deque2.begin();
cout << "偶数为:";
for (it2; it2 != deque1.end();it2++)
{
cout << *it2 << " ";
}
cout << endl;
cout << "奇数为:";
for (it3; it3 != deque2.end(); it3++)
{
cout << *it3 << " ";
}
cout << endl;
}