Problem In ROCK PAPER SCISSOR problem starter107

# cook your dish here
t=int(input())
for _ in range(t):
    n=int(input())
    a=input()
    b=input()
    a1=0
    b1=0
    for i in range(n):
        if a[i]=='R':
            if b[i]=='P':
                b1=b1+1
            elif b[i]=='S':
                a1=a1+1
            elif b[i]=='R':
                pass
        elif a[i]=='P':
            if b[i]=='S':
                b1=b1+1
            elif b[i]=='R':
                a1=a1+1
            elif b[i]=='P':
                pass
        elif a[i]=='S':
            if b[i]=='R':
                b1=b1+1
            elif b[i]=='P':
                a1=a1+1
            elif b[i]=='S':
                pass
    if a1<b1:
        k=b1-a1
        print(k)
    elif a1>b1:
        print(0)
    elif a1==b1:
        print(1)

This is my code can you tell me where is the problem