Объясните пожалуйста?
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 input = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> MainList = new ArrayList<Integer>();
ArrayList<Integer> x3 = new ArrayList<Integer>();
ArrayList<Integer> x2 = new ArrayList<Integer>();
ArrayList<Integer> other = new ArrayList<Integer>();
for (int i = 0; i < 20; i++) {
MainList.add(Integer.parseInt(input.readLine()));
}
for (int i = 1; i < MainList.size(); i++) {
if (MainList.get(i) % 3 == 0) {
if (MainList.get(i) % 2 == 0) {
x3.add(MainList.get(i));
x2.add(MainList.get(i));
}
else {
x3.add(MainList.get(i));
}
}
else if (MainList.get(i) % 2 == 0) {
x2.add(MainList.get(i));
}
else {
other.add(MainList.get(i));
}
}
printList(x3);
printList(x2);
printList(other);
}
public static void printList(ArrayList<Integer> list) {
for (int x : list) {
System.out.println(x);
}
}
}