Well, the site keeps showing the message to me that my code do not pass the last two verifications, even when my code works perfectly fine. Does anyone have any idea why my code doesn't work?
package com.codegym.task.task07.task0708;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

Longest string
1. Initialize the list of strings.
2. Read 5 strings from the keyboard and add them to this list.
3. Using a loop, find the longest string in the list.
4. Display the string. If there is more than one, display each on a new line.

public class Solution {
    private static List<String> strings = new ArrayList<>();

    public static void main(String[] args) throws Exception {
        //write your code here
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        for (int i=0; i<5; i++){

        int longest = 0;

        for (int i=0; i<strings.size(); i++){
            if (longest < strings.get(i).length()){
                longest = strings.get(i).length();

        for (String element: strings){
            if(longest == element.length()){