when i try validation i have info - The program ran too long and was closed! when i try run program input for example: 2 3 4 5 6t output: 4 5 Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) at java.base/java.util.Objects.checkIndex(Objects.java:385) at java.base/java.util.ArrayList.get(ArrayList.java:427) at pl.codegym.task.task09.task0921.Solution.czytajDane(Solution.java:26) at pl.codegym.task.task09.task0921.Solution.main(Solution.java:15) I use ArrayList and loop for each element from this list so how can i go out of bounds?