Vivod pravilnii, no poslednie uslovie ne rabotaet.
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 rd = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(rd.readLine());
int b = Integer.parseInt(rd.readLine());
int c = Integer.parseInt(rd.readLine());
int x = Math.max(Math.max(a, b), c);
int z = Math.min(Math.min(a, b), c);
int y;
if (x == b || x == a) {
y = c; }
else {
if (z == a) {
y = b; }
else {
y = a; }
}
System.out.print(x + " " + y + " " + z);
}
}