Почему вывод не верный?
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 br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
int b = Integer.parseInt(br.readLine());
int c = Integer.parseInt(br.readLine());
int first = 0;
int second = 0;
int third = 0;
if (a > b && a > c){
if (b > c){
first = a;
second = b;
third = c;
} else {
first = a;
second = c;
third = b;
}
} else if (b>a && b >c){
if (a > c){
first = b;
second = a;
third = c;
} else {
first = b;
second = c;
third = a;
}
}
else if (b > a) {
first = c;
second = b;
third = a;
} else {
first = c;
second = a;
third = b;
}
System.out.println(first+" "+second+" "+third);
}
}