#include #include using namespace std; int main() { int n; while (cin>>n) { vector a(n+1); for(int& v: a) cin>>v; reverse(begin(a), end(a)); for(int i=0;i+2