Объясните, почему не работает при равных значениях
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
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());
int x1, x2, x3;
if (a>=b && a>=c){
x1 = a;
if (b>=c){
x2=b;
x3=c;
}else{
x2=c;
x3=b;
}}
else if (b>=a && b>=c){
x1 = b;
if (a>=c){
x2=a;
x3=c;
}else {
x2=c;
x3=a;
}}
else if (c>=b && c>=a){
x1 = c;
if (b>=a){
x2=b;
x3=a;
}else{
x2=a;
x3=b;
}
System.out.println(x1 +" " + x2 + " " + x3);
}
}
}