Passed

mail@pastecode.io avatar
unknown
python
2 years ago
545 B
3
Indexable
Never
def res(S1,S2):
    S3=""
    for n in range(len(S1)):
        if (n%2==0):
            x=S1[n]
            if (ord(x)<122):
                S3=S3 + chr(ord(x)+1)
            elif(ord(x)==122):
                S3=S3 + "a"
        if(n%2!=0):
            y=S2[n]
            if(ord(y)<122):
                S3=S3 + chr(ord(y)+1)
            elif(ord(y)==122):
                S3=S3+ "a"
    return S3
s1=input()
s2=input()
n=int(input())
i=3
while (i<=n):
    a=res(s1,s2)
    s1=s2
    s2=a
    i=i+1
print(a)