#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ qsort(int *, int *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int i, t, in[9], out[9], inn;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    for (inn = 0; inn < 9; inn++) {
      scanf("%d", &in[inn]);
    }
    qsort(in, out, 9);
    for (inn = 0; inn < (9 - 1); inn++) {
      printf("%d ", out[inn]);
    }
    printf("%d\n", out[inn]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    120d <main+0xdd>
movl   $0x0,-0x74(%rbp)
cmpl   $0x9,-0x74(%rbp)
jge    11a6 <main+0x76>
movslq -0x74(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6d(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1173 <main+0x43>
lea    -0x40(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x9,%edx
call   1030 <qsort@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0x8,-0x74(%rbp)
jge    11eb <main+0xbb>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xe2b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11bf <main+0x8f>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xe0d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    127e <main+0x14e>
xor    %r15d,%r15d
lea    0xe9c(%rip),%r12
lea    0x40(%rsp),%r13
lea    0x10(%rsp),%rbx
lea    0xe8e(%rip),%rbp
lea    0xe8b(%rip),%r14
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x44(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x48(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x4c(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x50(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x54(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x58(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x5c(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x60(%rsp),%rsi
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x9,%edx
call   1030 <qsort@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbp,%rdi
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%r15d
cmp    0xc(%rsp),%r15d
jl     1180 <main+0x50>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [9 x i32]
%5 = alloca [9 x i32]
%6 = bitcast i32* %3 to i8*
%7 = bitcast [9 x i32]* %4 to i8*
%8 = bitcast [9 x i32]* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %64
12: ; preds = %2
%13 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 0
%15 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 1
%16 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 2
%17 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 3
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 4
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 5
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 6
%21 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 7
%22 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 8
%23 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 1
%24 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 2
%25 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 3
%26 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 4
%27 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 5
%28 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 6
%29 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 7
%30 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 8
br label %31
31: ; preds = %12, %31
%32 = phi i32 [ 0, %12 ], [ %61, %31 ]
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %18)
%38 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %20)
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %22)
%42 = call i32 @qsort(i32* %13, i32* %14, i32 9)
%43 = load i32, i32* %14
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %23
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %24
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %25
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %26
%52 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %51)
%53 = load i32, i32* %27
%54 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %28
%56 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %29
%58 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %30
%60 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %59)
%61 = add nuw nsw i32 %32, 1
%62 = load i32, i32* %3
%63 = icmp slt i32 %61, %62
br i1 %63, label %31, label %64
64: ; preds = %31, %2
ret i32 0
}