Help me in solving DNASTORAGE problem

My issue

solution

My code

# cook your dish here
n=int(input())
i=1 
while(i<=n):
    a=int(input())
    i+=1 
    j=1 
    s=[]
    r=[]
    while(j<=a):
        b=int(input())
        s.append(b)
        for i in range(0,len(s)//2):
           r.append(s[0])
           r.append(s[1])
           s.pop(0)
           s.pop(0)
           if(r[0]+r[1]==00): print("A")
           elif(r[0]+r[1]=='01'): print("T")
           elif(r[0]+r[1]==10): print("C")
           elif(r[0]+r[1]==11): print("G")
        
        
        

Learning course: Strings using C
Problem Link: DNA Storage Practice Problem in - CodeChef

@master_artisth
plzz refer the following code

# cook your dish here
n=int(input())
for i in range(1,n+1):
    a=int(input())
    z=""
    h=str(input())
    for j in range(0,a,2):
        if(h[j]+h[j+1]=="00"):
            z=z+"A"
        elif(h[j]+h[j+1]=="01"):
            z=z+"T"
        elif(h[j]+h[j+1]=="10"):
            z=z+"C"
        else:
            z=z+"G"
    print(z)