public class Solution { public static void main(String[] args) throws Exception { //écris ton code ici BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> list = new ArrayList<String>(); for(int i = 0; i < 10; i++) { String s = br.readLine(); list.add(0, s); } for (int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); } } } I found how to put lines at the beginning of the list following the course. But i don't understand why adding the index at 0 in list.add(index, s), the printed result will begin by the end of the list ? If may someone enlighten me ?