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 max1 = Math.max(a,c);
int max2 = Math.max(a,b);
int min1 = Math.min(b,c);
if (max2>max1 && max1> min1) {
System.out.println(max2 + " " + max1 + " " + min1);
} else if (max2>max1 && min1> max1) {
System.out.println(max2 + " " + min1 + " " + max1);
}else if (min1> max2 && max2> max1) {
System.out.println(min1 + " " + max2 + " " + max1);
}else if (min1> max2 && max1> max2) {
System.out.println(min1 + " " + max1 + " " + max2);
} else if (max1> max2 && max2> min1) {
System.out.println(max1 + " " + max2 + " " + min1);
} else if (max1> max2 && min1> max2) {
System.out.println(max1 + " " + min1 + " " + max2);
}
}
}
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.*;
import java.util.*;
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 max1 = Math.max(a,c);
int max2 = Math.max(a,b);
int min1 = Math.min(b,c);
if (max2>max1 && max1> min1) {
System.out.println(max2 + " " + max1 + " " + min1);
} else if (max2>max1 && min1> max1) {
System.out.println(max2 + " " + min1 + " " + max1);
}else if (min1> max2 && max2> max1) {
System.out.println(min1 + " " + max2 + " " + max1);
}else if (min1> max2 && max1> max2) {
System.out.println(min1 + " " + max1 + " " + max2);
} else if (max1> max2 && max2> min1) {
System.out.println(max1 + " " + max2 + " " + min1);
} else if (max1> max2 && min1> max2) {
System.out.println(max1 + " " + min1 + " " + max2);
}
}
}