class Solution:
def mergeAlternately(self, word1: str, word2: str) -> str:
ans = ""
i = j = 0
idx = 0
while i < len(word1) and j < len(word2):
if idx % 2 == 0 :
ans += word1[i]
i += 1
else:
ans += word2[j]
j += 1
idx += 1
return ans + word1[i:] + word2[j:]