can't seem to satisfy the last condition. need help
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));
String firstNum=scan.readLine();
String secondNum=scan.readLine();
String thirdNum=scan.readLine();
int a= Integer.parseInt(firstNum);
int b= Integer.parseInt(secondNum);
int c= Integer.parseInt(thirdNum);
// a
if(a>=b&&a>=c){System.out.print(a+" ");
if(b>c){System.out.print(b+" "+c);}
else{System.out.print(c+" "+b);}
}
//b
if(b>=a&&b>=c){System.out.print(b+" ");
if(a>c){System.out.print(a+" "+c);}
else{System.out.print(c+" "+a);}
}
//c
if(c>=b&&c>=a){System.out.print(c+" ");
if(b>a){System.out.print(b+" "+a);}
else{System.out.print(a+" "+b);}
}
}
}