#include <iostream>
#include <set>
using namespace std;
int main() {
set<int> S = {1,2,3,4,5,6,0};
for(auto it = S.begin(); it!=S.end(); /* don't do anything here*/ ) {
if(*it % 2 == 0) it = S.erase(it);
else {
cout<<*it<<endl;
it++;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c2V0Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzZXQ8aW50PiBTID0gezEsMiwzLDQsNSw2LDB9OwoJZm9yKGF1dG8gaXQgPSBTLmJlZ2luKCk7IGl0IT1TLmVuZCgpOyAvKiBkb24ndCBkbyBhbnl0aGluZyBoZXJlKi8gKSB7CgkJaWYoKml0ICUgMiA9PSAwKSBpdCA9IFMuZXJhc2UoaXQpOwoJCWVsc2UgewoJCQljb3V0PDwqaXQ8PGVuZGw7CgkJCWl0Kys7CQkJCgkJfQoJfQoJcmV0dXJuIDA7Cn0=