import java.io.*;
import java.util.StringTokenizer;

public class Uloha1 {
   static int readNumber(BufferedReader inp) throws IOException
   {
      return Integer.parseInt(inp.readLine().trim());
   }

   public static void main(String[] args) throws IOException
   {
      BufferedReader inp = new BufferedReader(
                              new InputStreamReader(System.in));
      int pocet = readNumber(inp);
      for(int i = 0; i < pocet; i++) {
         priklad(inp);
      }
   }

   static void priklad(BufferedReader inp) throws IOException
   {
      ...
      // příklad čtení seznamu čísel na jednom řádku
      int n = readNumber(inp);
      StringTokenizer st = new StringTokenizer(inp.readLine());
      for(int i = 0; i < n; i++) {
         int x = Integer.parseInt(st.nextToken());
         ...
      }
      ...
   }
}

