Help me in solving STJ02 problem

My issue

My code

// Update the code below to solve this problem
import java.util.Scanner;
class Codechef
{
	public static void main (String[] args)
	{
		Scanner read = new Scanner(System.in);
		char[] reverse =null;
		String b = "";
		String a="";
		int t = read.nextInt();
		for(int i=0; i<t; i++)
		{
    		String s = read.next();
    		
    	
    		System.out.println(s.length());
    	
    		
    		// Write the code below this line to generate String A
            for(int index=0;index<s.length();index++){
              a=a+s.charAt(index);
            }
    
            for(int index=0;index<s.length();index++ ){
                b=s.charAt(index)+b;
                
            }		
        System.out.println(" source string "+s);
    		System.out.println("a value"+a);
    		System.out.println("b value"+b);
		}
	}
}

Learning course: Java for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone