#include <iostream>
#include <vector>
int main(void)
{
std::vector<int> v = { 1, 4, 9, 16, 25, 36, 49 };
std::cout << v.rbegin()[1] << std::endl
<< v.end()[-2] << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKaW50IG1haW4odm9pZCkKewogICAgc3RkOjp2ZWN0b3I8aW50PiB2ID0geyAxLCA0LCA5LCAxNiwgMjUsIDM2LCA0OSB9OwogICAgCiAgICBzdGQ6OmNvdXQgPDwgdi5yYmVnaW4oKVsxXSA8PCBzdGQ6OmVuZGwKICAgICAgICAgICAgICA8PCB2LmVuZCgpWy0yXSA8PCBzdGQ6OmVuZGw7Cgp9