import java.io.*;

/**
 * Program to sort three numbers.
 * @author	Qusay H. Mahmoud
 */

public class Sort1 {
   public static void main(String argv[]) throws Exception {
      // connect an input stream to the keyboard
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      // three variables to hold the input
      int a, b, c;
      System.out.print("Enter first number: ");
      // read a number as a string and convert it to an integer value
      a = Integer.parseInt(br.readLine());
      System.out.print("Enter second number: ");
      // read a number as a string and convert it to an integer value
      b = Integer.parseInt(br.readLine());
      // read a number as a string and convert it to an integer value
      System.out.print("Enter third number: ");
      c = Integer.parseInt(br.readLine());
      
      // now sort the numbers in ascending (increasing) order
      int max;
      if(a > b) {
        max = a;
        a = b;
        b = max;
      }
      if(b > c) {
        max = b;
        b = c;
        c = max;
      }
      if(a > b) {
        max = a;
        a = b;
        b = max;
      }
      System.out.println("The sorted numbers are: "+ a + ", " + b + ", " + c);

   }
}
