Can anyone help me and tell me what is wrong with my code ? Seems working fine but it not passed out
package pl.codegym.task.task04.task0419;
/*
Największa z czterech liczb
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//tutaj wpisz swój kod
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
int firstDigit = Integer.parseInt(reader.readLine());
int secondDigit = Integer.parseInt(reader.readLine());
int thirdDigit = Integer.parseInt(reader.readLine());
int fourthDigit = Integer.parseInt(reader.readLine());
if (firstDigit == secondDigit && secondDigit == thirdDigit && thirdDigit ==fourthDigit){
System.out.println(firstDigit);
} else if (firstDigit > secondDigit && firstDigit > thirdDigit && firstDigit > fourthDigit){
System.out.println(firstDigit);
} else if (secondDigit > firstDigit && secondDigit > thirdDigit && secondDigit > fourthDigit ) {
System.out.println(secondDigit);
}else if (thirdDigit>firstDigit && thirdDigit>secondDigit && thirdDigit > fourthDigit ) {
System.out.println(thirdDigit);
} else {
System.out.println(fourthDigit);
}
}
}