class Solution:
def shiftingLetters(self, s: str, shifts: List[int]) -> str:
alphabet = "abcdefghijklmnopqrstuvwxyz"
dic = {v:k for k, v in zip(range(26), alphabet)}
answer = ""
shifting_list = list(accumulate(shifts[::-1]))[::-1]
for i, j in zip(s, shifting_list):
answer += alphabet[(dic[i] + j) % 26]
return answer
O(N)
O(N)