#include using namespace std; #define FOR(i,o,n) for(long long i = o;i void in(T &t,U &...u){ cin >> t; in(u...);} void out(){cout << "\n";} template void out(const T &t,const U &...u){ cout << t; if(sizeof...(u)) cout << " "; out(u...);} typedef vector vi; typedef vector vl; typedef long long ll; typedef vector > vpll; typedef vector > vpii; int32_t main() { oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall oneforall ini(n); ini(n1); ins(morty); FOR(i,0,n-n1+1){ reverse(morty.begin()+i,morty.begin()+i+n1); //out(morty); } out(morty); return 0; }