Help me in solving GSJ211 problem

My issue

My code

// Update the '_' in the code below
import java.util.Scanner;

class Codechef
{
	public static void main (String[] args)
	{
        Scanner read = new Scanner(System.in);
        // accept the count of test cases given in the 1st line
        int t = read.nextInt();
        
        // Run a loop to accept 't' inputs
        for(int i=0; i<t; i++)
        {
            // accept 2 integers on the 1st line of each test case
            int a = read.nextInt();
            int b = read.nextInt();
            
            
            // accept 1 string on the 2nd line of each test case
            String s = read.nextLine();
            
            // output the 2 integers and 1 string on a single line for each test case
            System.out.println(a + " " + b + " " + s);
            
            
        }
	}
}

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

@codingpk Don’t need to use nextLine() method to read String … instead of this you can use next() method. next() method can read the input only until a space(" ") is encountered.

import java.util.Scanner;

class Codechef
{
public static void main (String[] args)
{
Scanner read = new Scanner(System.in);
// accept the count of test cases given in the 1st line
int t = read.nextInt();

    // Run a loop to accept 't' inputs
    for(int i=0; i<t; i++)
    {
        // accept 2 integers on the 1st line of each test case
        int a = read.nextInt();
        int b = read.nextInt();
        
        // accept 1 string on the 2nd line of each test case
        String s = read.next();
        
        // output the 2 integers and 1 string on a single line for each test case
        System.out.println(a + " " + b + " " + s);
    }
}

}