All conditions that are given to me are correct. Am I missing something? Thanks in advance!

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 you = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(you.readLine());
int b = Integer.parseInt(you.readLine());
int c = Integer.parseInt(you.readLine());
a = 2;
b = 4;
c = 2;
if (a < b && a > c){
System.out.println(a);
} else if (a < c && a > b){
System.out.println(a);
} else if (a < b && a < c && b == c){
System.out.println(a);
} else if (a < c && b < c && a == b){
System.out.println(a);
} else if (a < b && c < b && a == c){
System.out.println(a);
}
if (b < a && b > c){
System.out.println(b);
} else if (b > a && b < c){
System.out.println(b);
} else if (b < a && b < c && a == c){
System.out.println(b);
} else if (b < a && b < c && b == c){
System.out.println(b);
} else if (b < a && c < a && b == c){
System.out.println(b);
}
if ( c < a && c > b){
System.out.println(c);
} else if ( c > a && c < b){
System.out.println(c);
} else if ( c < a && c < b && a == b){
System.out.println(c);
}
if (a == b && b == c && c == a){
System.out.println(b);
}
}
}

3, 1, 2and sorted them you would have1, 2, 3in which case the middle number would be the answer. It works for any values you enter: enter -1, 2, 1then sort them you would get1, 1, 2and the middle is the answer enter5, 5, 3sort to3, 5, 5and the middle is the answer.