#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int main() {
  int n, i;
  int array[101], tmp;
  while (scanf("%d", &n) != EOF) {
    memset(array, 0, sizeof(array));
    for (i = 0; i < n; i++) {
      scanf("%d", &tmp);
      array[tmp]++;
    }
    for (i = 0; i < 101; i++) {
      while (array[i] > 0) {
        printf("%d ", i);
        array[i]--;
      }
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e8f(%rip),%rcx
cmp    (%rcx),%rax
je     123a <main+0x10a>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x194,%edx
call   1040 <memset@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c1 <main+0x91>
lea    0xe71(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    117c <main+0x4c>
movl   $0x0,-0xc(%rbp)
cmpl   $0x65,-0xc(%rbp)
jge    1227 <main+0xf7>
jmp    11d7 <main+0xa7>
movslq -0xc(%rbp),%rax
cmpl   $0x0,-0x1a0(%rbp,%rax,4)
jle    1214 <main+0xe4>
mov    -0xc(%rbp),%esi
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1a0(%rbp,%rax,4)
jmp    11d7 <main+0xa7>
jmp    1219 <main+0xe9>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c8 <main+0x98>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xea8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x2e7f(%rip),%r14
cmp    (%r14),%rax
jne    1182 <main+0x42>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe77(%rip),%r12
lea    0xc(%rsp),%r15
lea    0xe6e(%rip),%rbx
lea    0x8(%rsp),%r13
jmp    11ba <main+0x7a>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1060 <scanf@plt>
cmp    (%r14),%rax
je     116e <main+0x2e>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0x194,%edx
call   1050 <memset@plt>
cmpl   $0x0,0x8(%rsp)
jle    11fe <main+0xbe>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
addl   $0x1,0x10(%rsp,%rax,4)
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     11e0 <main+0xa0>
xor    %ebp,%ebp
jmp    121a <main+0xda>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    $0x65,%rbp
je     11a0 <main+0x60>
cmpl   $0x0,0x10(%rsp,%rbp,4)
jle    1210 <main+0xd0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp,%rbp,4),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x10(%rsp,%rbp,4)
cmp    $0x1,%eax
jg     1230 <main+0xf0>
jmp    1210 <main+0xd0>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [101 x i32]
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %50, %0
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %52
10: ; preds = %6
%11 = getelementptr inbounds [101 x i32], [101 x i32]* %4, i64 0, i64 0
%12 = call i32 @memset(i32* %11, i32 0, i32 404)
store i32 0, i32* %3
br label %13
13: ; preds = %24, %10
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %27
17: ; preds = %13
%18 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [101 x i32], [101 x i32]* %4, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = add nsw i32 %22, 1
store i32 %23, i32* %21
br label %24
24: ; preds = %17
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %13
27: ; preds = %13
store i32 0, i32* %3
br label %28
28: ; preds = %47, %27
%29 = load i32, i32* %3
%30 = icmp slt i32 %29, 101
br i1 %30, label %31, label %50
31: ; preds = %28
br label %32
32: ; preds = %38, %31
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [101 x i32], [101 x i32]* %4, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %46
38: ; preds = %32
%39 = load i32, i32* %3
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %3
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [101 x i32], [101 x i32]* %4, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = add nsw i32 %44, -1
store i32 %45, i32* %43
br label %32
46: ; preds = %32
br label %47
47: ; preds = %46
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
store i32 %49, i32* %3
br label %28
50: ; preds = %28
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %6
52: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i32]
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast [101 x i32]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %48, label %10
10: ; preds = %0
%11 = getelementptr inbounds [101 x i32], [101 x i32]* %2, i64 0, i64 0
br label %12
12: ; preds = %10, %43
%13 = call i32 @memset(i32* %11, i32 0, i32 404)
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %12, %16
%17 = phi i32 [ %24, %16 ], [ 0, %12 ]
%18 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [101 x i32], [101 x i32]* %2, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = add nsw i32 %22, 1
store i32 %23, i32* %21
%24 = add nuw nsw i32 %17, 1
%25 = load i32, i32* %1
%26 = icmp slt i32 %24, %25
br i1 %26, label %16, label %27
27: ; preds = %16, %12
br label %28
28: ; preds = %27, %40
%29 = phi i64 [ %41, %40 ], [ 0, %27 ]
%30 = getelementptr inbounds [101 x i32], [101 x i32]* %2, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %40
33: ; preds = %28
%34 = trunc i64 %29 to i32
br label %35
35: ; preds = %33, %35
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%37 = load i32, i32* %30
%38 = add nsw i32 %37, -1
store i32 %38, i32* %30
%39 = icmp sgt i32 %37, 1
br i1 %39, label %35, label %40
40: ; preds = %35, %28
%41 = add nuw nsw i64 %29, 1
%42 = icmp eq i64 %41, 101
br i1 %42, label %43, label %28
43: ; preds = %40
%44 = call i32 @putchar(i32 10)
%45 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%46 = load i64, i64* @EOF
%47 = icmp eq i64 %45, %46
br i1 %47, label %48, label %12
48: ; preds = %43, %0
ret i32 0
}