Please help.
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 String min = "";
public static void main(String[] args) throws Exception {
ArrayList <String> list1 = new ArrayList<String>();
BufferedReader read = new BufferedReader (new InputStreamReader(System.in));
for (int x = 0; x < 5; x++) {
list1.add(read.readLine());
}
int check = list1.get(0).length();
for (int z = 0; z < list1.size(); z++) {
if (list1.get(z).length() <= check) {
min = list1.get(z);
}
}
for (int w = 0; w < 5; w++) {
int len = list1.get(w).length();
int len2 = Solution.min.length();
if (len == len2) {
System.out.println(list1.get(w));
}
}
}
}