I can't identify what is wrong with this code. Please I need help with it. Thanks
package com.codegym.task.task07.task0709;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Expressing ourselves more concisely
*/
public class Solution {
public static void main(String[] args) throws Exception {
ArrayList<String> list = new ArrayList<>();
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
int min = 0;
for(int i = 0; i < 5; i++){
String s = read.readLine();
list.add(s);
if(list.get(i).length() <= list.get(0).length()){
min = list.get(i).length();
}
}
for(int a = 0; a < list.size(); a++){
if(list.get(a).length() == min){
System.out.println(list.get(a));
}
}
}
}