что не так то?(((
package com.javarush.task.task07.task0713;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Играем в Jолушку
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
ArrayList<Integer> listMain = new ArrayList<>();
ArrayList<Integer> listDel3 = new ArrayList<>();
ArrayList<Integer> listDel2 = new ArrayList<>();
ArrayList<Integer> listOther = new ArrayList<>();
for (int i = 0; i < listMain.size(); i++) {
int s = Integer.parseInt(br.readLine());
listMain.add(s);
}
for (int i = 0; i < listMain.size(); i++) {
if (listMain.get(i) % 3 == 0) {
listDel3.add(listMain.get(i));
}
}
for (int i = 0; i < listMain.size(); i++) {
if (listMain.get(i) % 2 == 0) {
listDel2.add(listMain.get(i));
}
}
for (int i = 0; i < listMain.size(); i++) {
if (listMain.get(i) % 3 != 0 && listMain.get(i) % 2 != 0) {
listOther.add(listMain.get(i));
}
}
for (int i = 0; i < listMain.size(); i++) {
if (listMain.get(i) % 3 == 0 && listMain.get(i) % 2 == 0) {
listDel3.add(listMain.get(i));
listDel2.add(listMain.get(i));
}
}
printList(listDel3);
printList(listDel2);
printList(listOther);
}
public static void printList(ArrayList<Integer> listMain) {
for (Integer i : listMain){
System.out.println(i);
}
}
}