You can see the first entry, it is just empty String.
The reason for this is that when you call int n = sc.nextInt();, and the user presses Enter, Scannerreads an integer, but leaves the end of line character at the end.
sc.next(), "leftover" String, .
: sc.next() sc.nextInt() .