#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
// your code goes here
vector<int> temp{1,2,3,4,4,5};
auto it = temp.begin();
it = find(it, temp.end(), 3);
temp.erase(it);
temp.insert(it,6);
cout << *it << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgl2ZWN0b3I8aW50PiB0ZW1wezEsMiwzLDQsNCw1fTsKCWF1dG8gaXQgID0gdGVtcC5iZWdpbigpOwoJaXQgPSBmaW5kKGl0LCB0ZW1wLmVuZCgpLCAzKTsKCXRlbXAuZXJhc2UoaXQpOwoJdGVtcC5pbnNlcnQoaXQsNik7Cgljb3V0IDw8ICppdCA8PCBlbmRsOwoJCglyZXR1cm4gMDsKfQ==