package com.javarush.task.task04.task0420; /* Сортировка трех чисел */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Solution { public static void main(String[] args) throws Exception { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); String m = r.readLine(); String n = r.readLine(); String f = r.readLine(); int s = Integer.parseInt(m); int z = Integer.parseInt(n); int t = Integer.parseInt(f); int ss = Math.max(s, z); int mm = Math.max(ss, t); int ff = Math.min(s, z); int nn = Math.min(ff, z); if (s >= nn && s <= mm) { System.out.println(mm + " " + s + " " + nn); } else if (z >= nn && z <= mm) { System.out.println(mm + " " + z + " " + nn); } else if (t >= nn && t <= mm) { System.out.println(mm + " " + t + " " + nn); } } }