C5

include <iostream>

using namespace std;

int main()
{
int i,n,k;
cin>>n;
cin>>k;
int niz[n];
for(i=0;i<n;i++)
cin>>niz[i];
k=k%n;
for (int i = 0; i < n; i++)
cout << niz[(k + i) % n] << endl;
return 0;
}

Advertisements