/* 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
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(reader.readLine());
while(T!=0){
int N = Integer.parseInt(reader.readLine());
//String B = reader.readLine();
StringTokenizer st = new StringTokenizer(reader.readLine());
int[] A = new int[N];
Queue Q = new LinkedList<>();
Queue P = new LinkedList<>();
for(int i=0;i<N;i++){
A[i] = Integer.parseInt(st.nextToken());
if(A[i] % 2 == 0){
Q.add(A[i]);
}
else
P.add(A[i]);
}
//int count=0;
// for(int k=0;k<N;k++){
// if(A[k] % 2 == 0){
// System.out.print(A[k]+" ");
// }
for(int i=0;i<Q.size();i++){
int curr = Q.poll();
System.out.print(curr+" ");
}
for(int i=0;i<P.size();i++){
int curr = P.poll();
System.out.print(curr+" ");
}
System.out.println("/n");
// for(int i=0;i<count;i++){
// for(int j=1;j<N;j++){
// if(A[j] % 2 == 0){
// int temp = A[i];
// A[i] = A[j];
// A[j] = temp;
// break;
// }
// }
// }
// for(int i=0;i<N;i++){
// System.out.print(A[i]);
// }
T--;
}
}
catch(Exception e){
e.printStackTrace();
}
}
}
can anyone please explain what is wrong with this?