Подскажите пожалуйста, где я что упускаю?
package com.javarush.task.task07.task0713;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
/*
Играем в Jолушку
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
Reader r = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> list = new ArrayList<Integer>();
ArrayList<Integer> firstarray = new ArrayList<Integer>();
ArrayList<Integer> secondarray = new ArrayList<Integer>();
ArrayList<Integer> thirdarray = new ArrayList<Integer>();
for (int i = 0; i < 20; i++) {
list.add(Integer.parseInt(reader.readLine()));
}
for (int j = 0; j < list.size(); j++) {
if (list.get(j) % 3 == 0 || (list.get(j) % 3 == 0 && list.get(j) % 2 == 0)) firstarray.add(list.get(j));
}
for (int x = 0; x < list.size(); x++) {
if (list.get(x) % 2 == 0 || (list.get(x) % 3 == 0 && list.get(x) % 2 == 0)) secondarray.add(list.get(x));
}
for (int y = 0; y < list.size() ; y++) {
if (list.get(y) % 2 != 0 && list.get(y) % 3 != 0 ) thirdarray.add(list.get(y));
}
printList(firstarray);
printList(secondarray);
printList(thirdarray);
}
public static void printList(ArrayList<Integer> list) {
//напишите тут ваш код
System.out.println(list);
}
}