Under construction

Still being built. Things may change

Phoenix Locks the Door

Interview

Time limit1sMemory limit1024 MB

Summary
Given N dials showing letters, find the lexicographically smallest string after turning single dials exactly K times, with each turn advancing a letter and wrapping Z to A.
Level

Medium5 of 10

Topics
Greedy, String, Implementation
Solved
No attempts yet

Problem

Where is Phoenix's house? People assume Phoenix lives at POSTECH, but he actually lives in the Phoenix village high in the sky. Outsiders can hardly reach the village, and since phoenixes are born righteous, they often forget to lock their doors.

Phoenix is no exception. Every day he travels between POSTECH and the village without locking his door. One day, while Phoenix was away from home, Mr. K, a famous thief from POSTECH, installed a lock on Phoenix's house! The lock is made of NN dials connected together, and each dial has the uppercase letters A through Z written in order.

To open the lock, Phoenix can pick one dial and turn it 11 step. The letter shown on the chosen dial changes from A to B, B to C, ..., and Z to A. Dials cannot be turned in the opposite direction. Phoenix has learned that the password is the lexicographically smallest string he can display after performing exactly KK turns. Help Phoenix get his house back by finding the password.

Input

The first line contains the length NN of the lock and the number of turns KK, separated by a space. (1≤N≤200 000;0≤K≤1 000 000)(1 \le N \le 200\ 000; 0 \le K \le 1\ 000\ 000)

The second line contains the string SS of length NN currently shown on the lock. SS consists only of uppercase letters.

Output

Print the lexicographically smallest string that can be displayed by turning the dials exactly KK times.

Hint

For two strings AA and BB of the same length NN, AA is lexicographically smaller than BB if there is an integer ii that satisfies the following conditions.

  • 1≤i≤N1 \le i \le N
  • Aj=BjA_j = B_j for all 1≤j<i1 \le j < i
  • Ai≠BiA_i \ne B_i, and AiA_i comes before BiB_i in alphabetical order.

Examples2

  1. Example 1

    Input
    4 3
    ABCD
    
    Expected output
    ABCG
    
  2. Example 2

    Input
    4 5
    XYZW
    
    Expected output
    AAZW