Не проходит последнее условие
package com.javarush.task.task04.task0420;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Сортировка трех чисел
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
int max = Math.max(a,Math.max(b,c));
int min = Math.min(a,Math.min(b,c));
int mid=0;
if (c>=a && c<=b)
mid =b;
else
if (a>=b && a<=c)
mid =a;
else
if (b>=c && b<=a)
mid =c;
else{}
System.out.println(max + " " + mid + " " + min);
}
}