Help me in solving DNASTORAGE problem

My issue

explain with code in java

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		int t;
		String g;
		int c;
		Scanner sc = new Scanner(System.in);
		while(t-->0)
		{
		    c =sc.nextInt();
		  //  String g;
		    g=sc.nextInt();
		   
		    for (int i=0;i<g.length();i=i+2)
		    {
		        
		        if (g[i]==0 && g[i+1]==0)
		        System.out.println("A");
		       else  if (g[i]==0 && g[i+1]==1)
		        System.out.println("T");
		        else if (g[i]==1 && g[i+1]==0)
		        System.out.println("C");
		       else  
		        System.out.println("G");
		        
		    }
		}
	}
}

Learning course: Strings using Java
Problem Link: Practice Problem in - CodeChef