#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define F0R(i,n) FOR(i,0,n)

int main(void) {
	int n;
	printf("Enter the size of the array: ");
	scanf("%i", &n);
	printf("Enter the elements of the array: ");
	int arr[n];
	F0R(i,n) scanf("%i", &arr[i]);
	printf("Enter the number of steps to rotate to the right: ");
	int k;
	scanf("%i", &k);
	printf("Array after %i steps rotation to the right: ", k);
	F0R(i,k) {
		int temp = arr[n-1];
		for (int i = n-1; i >= 1; i--) arr[i] = arr[i-1];
		arr[0] = temp;
	}
	F0R(i,n) printf("%i ", arr[i]);
	putchar('\n');
}