Ok, I got the output but I still cant pass the first and last conditions, can anyoe explain me what is going on?