#include <iostream>
#include <vector>
using namespace std;
int main() {
// your code goes here
vector<int> v {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
for (int x : v) {
cout << x << endl;
if (x) v.push_back(x / 2);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgl2ZWN0b3I8aW50PiB2IHsxLCAyLCAzLCA0LCA1LCA2LCA3LCA4LCA5LCAxMH07Cglmb3IgKGludCB4IDogdikgewoJCWNvdXQgPDwgeCA8PCBlbmRsOwoJCWlmICh4KSB2LnB1c2hfYmFjayh4IC8gMik7Cgl9CglyZXR1cm4gMDsKfQ==