output_description: Print the lexicographically smallest string after performing exactly K
  operations on s.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      s
      K
attempt: w = input()
  nw = len(w)
  lw = list(w)
  n = int(input())
  alpha = "qwertyuiopasdfghjklzxcvbnm"
  l = sorted(list(alpha))
  d = {}
  for i in range(26):
      d[l[i]] = i
  num = n
  count = 0
  while num > 0 and count < nw:
      if lw[count] == "a":
          count += 1
      else:
          letter = lw[count]
          if 27 - d[letter] - 1 <= num:
              num -= 27 - d[letter] - 1
              lw[count] = "a"
              count += 1
          else:
              count += 1
  if num > 0:
      a = lw[-1]
      num1 = d[a]
      lw[-1] = l[(num1 + num) % 26]
  print("".join(lw))
  
problem_description: Statement
  
  Mr. Takahashi has a string s consisting of lowercase English letters. He
  repeats the following operation on s exactly K times.
  
    * Choose an arbitrary letter on s and change that letter to the next alphabet. Note that the next letter of `z` is `a`.
  
  For example, if you perform an operation for the second letter on `aaz`, `aaz`
  becomes `abz`. If you then perform an operation for the third letter on `abz`,
  `abz` becomes `aba`.
  
  Mr. Takahashi wants to have the lexicographically smallest string after
  performing exactly K operations on s. Find the such string.
samples: [{"input": "xyz\n    4", "output": "aya\n    \n\nFor example, you can perform the following operations: `xyz`, `yyz`, `zyz`,\n`ayz`, `aya`.\n\n* * *"}, {"input": "a\n    25", "output": "z\n    \n\nYou have to perform exactly K operations.\n\n* * *"}, {"input": "codefestival\n    100", "output": "aaaafeaaivap"}]