Code works when I try to run it in all possible variations, just can't verify it. Please help!
package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(read.readLine());
int b = Integer.parseInt(read.readLine());
int c = Integer.parseInt(read.readLine());
if ((a<=b && a>=c) || (a>=b && a<=c))
System.out.println(a);
else if ((b<a && b>=c) || (b>a && b<=c))
System.out.println(b);
else
System.out.println(c);
}
}