every output is correct, can't understand why it is not working even though i have elaborated it
package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
String l = sc.readLine();
int a = Integer.parseInt(l);
String m = sc.readLine();
int b = Integer.parseInt(m);
String n = sc.readLine();
int c = Integer.parseInt(n);
if(a==b||a==c)
{
System.out.println(a);
}
else{
if(b==c)
{
System.out.println(b);
}
else{
if(a>b&&a<c)
{
System.out.println(a);
}
else{
if(a>c&&a<b)
{
System.out.println(a);
}
else{
if(b>a&&b<c)
{
System.out.println(b);
}
else
{
if(b>c&&b<a)
{
System.out.println(b);
}
else
{
if(c>a&&c<b)
{
System.out.println(c);
}
else{
if(c>b&&c<a){
System.out.println(c);
}
else{
if((a==b)&&(b==c))
System.out.println(c);
}
}
}
} }
}
}
}
} }