#!/usr/bin/env python3 import sys input = sys.stdin.readline n, k = map(int, input().split()) s = list(input().rstrip()) s = s[k-1:] + s[:k-1] print("".join([item for item in s]))