**the output I'm looking for is this, when given hacker I need "Hce akr", I get the output, but after that it throws NullPointerException on char arr initialization **
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String arr[] = new String[10];
int k = 0;
while(k <= n){
arr[k] = in.nextLine();
k++;
}
for(int i = 0;i < arr.length;i++){
String myStr = "";
String myStr2 ="";
char charArr[] = arr[i].toCharArray();
for(int j = 0;j<charArr.length;j++){
if(j == 0 || j%2 ==0){
myStr += charArr[j];
}else if(j %2 != 0){
myStr2 += charArr[j];
}
}
System.out.println(myStr+" "+myStr2);
}
}```