Sorting code throwing tle

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
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(reader.readLine()); // t for #testcases
while (t-- > 0){
int n = Integer.parseInt(reader.readLine()); // n for length of array
int[] arr = Arrays.stream(reader.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
// above line reading whole line as string, then converting into integer array using api
Arrays.sort(arr); // To sort the array
String st = Integer.toString(arr[0]); // st to print output as String
for (int i = 1; i < n; i++) st += " " + arr[i]; // to display space seperated output integer from the array
System.out.println(st); // printing the output
}
}
}

This simple sorting code throwing tle for given below problem https://www.codechef.com/UAPRAC/problems/CNTSORT

Any java coder please help in rectifying this problem