# include<iostream>
# include<list>
using namespace std;
const int N = 100010;
int main(){
list<int> ml;
ml.push_back(1);
ml.push_back(3);
ml.push_back(6);
ml.push_back(5);
ml.push_front(9);
ml.push_back(1);
ml.push_back(3);
ml.push_back(6);
ml.push_back(5);
ml.push_front(80);
for (auto it = ml.begin(); it != ml.end();)
{
if (*it % 2 == 0) it = ml.erase(it);
else it ++;
}
for (auto it : ml) cout << it << ' ';
}