import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class SelectSort {
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int data[] = new int[5];
int temp = 0;
for (int i = 0; i < data.length; i++) {
System.out.print(i+1+"번째 수 : ");
data[i] = Integer.parseInt(in.readLine());
}
for (int i = 0; i < data.length-1; i++) {
for (int j = i + 1; j < data.length; j++) {
if (data[i] > data[j]) {
temp = data[i];
data[i] = data[j];
data[j] = temp;
}
}
}
for (int i = 0; i < data.length; i++) {
System.out.print(data[i]+" ");
}
}
}