import           Data.Char

solve :: [Int] -> Int -> String
solve [] _     = ""
solve [x] n    = [chr ((x+n)`mod`26 + ord 'a')]
solve (x:xs) n = if n < (26 - x) `mod` 26
  then chr (x + ord 'a') : solve xs n
  else 'a' : solve xs (n - ((26 - x) `mod` 26))

main :: IO ()
main = do
  s <- map (\c -> ord c - ord 'a') <$> getLine
  k <- readLn
  putStrLn $ solve s k
