Help me in solving DEBUGPYU14 problem

My issue

output is correct but getting error

My code

t = int(input())

for _ in range(t):
    n = int(input())
    s = input()

    s = [ord(c) for c in s]

    for i in range(0, n, 2):
        if i + 1 < n:
            s[i], s[i+1] = s[i+1], s[i]

    for i in range(n):
        if s[i] != ord('z'):
            s[i] = ord('a') + ord('z') - s[i]

    s = ''.join(chr(c) for c in s)
    print(s)

Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef

anyone reply