#include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main() {
auto A = vector<pair<int,int>>{{0,0},{1,1},{2,2},{3,3}};
auto it= A.begin();
auto it2= it+1;
for ( ; it != A.end()-1; it++ )
{
cout << it->first << " " << it2->first << "\n";
it2++;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8dXRpbGl0eT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJYXV0byBBID0gdmVjdG9yPHBhaXI8aW50LGludD4+e3swLDB9LHsxLDF9LHsyLDJ9LHszLDN9fTsKCWF1dG8gaXQ9IEEuYmVnaW4oKTsKICAgIGF1dG8gaXQyPSBpdCsxOwoKICAgIGZvciAoIDsgaXQgIT0gQS5lbmQoKS0xOyBpdCsrICkKICAgIHsKICAgICAgICBjb3V0IDw8IGl0LT5maXJzdCA8PCAiICIgPDwgaXQyLT5maXJzdCA8PCAiXG4iOwogICAgICAgIGl0MisrOwogICAgfQoJcmV0dXJuIDA7Cn0=