class Solution:
def replaceDigits(self, s: str) -> str:
res = ''
for index, char in enumerate(s):
if char.isdigit():
replace = chr(ord(s[index-1]) + int(char))
res += replace
elif char.isalpha():
res += char
return res