class Solution:
def addStrings(self, num1: str, num2: str) -> str:
n, m = len(num1), len(num2)
carry = 0
col = []
num1, num2 = num1[::-1], num2[::-1]
print(num1, num2)
b = max(n, m)
for i in range(b):
t1 = int(num1[i]) if i < n else 0
t2 = int(num2[i]) if i < m else 0
t_res = t1 + t2 + carry
if t_res > 9:
carry, t_res = 1, t_res - 10
else:
carry = 0
col.append(str(t_res))
if carry:
col.append('1')
return ''.join(col[::-1])