"""
https://codeforces.com/contest/1382/problem/C1
C1. Prefix Flip
"""

def solve(a, b, c):
    


if __name__ == "__main__":
    t = int(input())

    while t:
        n = int(input())
        a = input()
        b = input()
        solve(a, b, n)
        t -= 1
