#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*/ scanf(char *, int *);
int main() {
  int t, a[10][9], i, j, m, n;
  for (i = 1; i < 11; ++i) {
    a[i % 10][0] = i;
    for (j = 1; j < 9; ++j)
      a[i % 10][j] = a[i % 10][j - 1] * 10 + i % 10;
  }
  scanf("%d", &t);
  while (t--) {
    n = 1000000000;
    for (i = 0; i < 10; ++i) {
      scanf("%d", &m);
      if (a[i][m] < n)
        n = a[i][m];
    }
    printf("%d\n", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x174(%rbp)
cmpl   $0xb,-0x174(%rbp)
jge    1236 <main+0x116>
mov    -0x174(%rbp),%ecx
mov    -0x174(%rbp),%eax
mov    $0xa,%esi
cltd
idiv   %esi
movslq %edx,%rdx
lea    -0x170(%rbp),%rax
imul   $0x24,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movl   $0x1,-0x178(%rbp)
cmpl   $0x9,-0x178(%rbp)
jge    121d <main+0xfd>
mov    -0x174(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    -0x170(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
mov    -0x178(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0xa,(%rax,%rcx,4),%eax
mov    %eax,-0x188(%rbp)
mov    -0x174(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x188(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x184(%rbp)
mov    -0x174(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    -0x184(%rbp),%edx
movslq %eax,%rcx
lea    -0x170(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x178(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x178(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x178(%rbp)
jmp    117a <main+0x5a>
jmp    1222 <main+0x102>
mov    -0x174(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x174(%rbp)
jmp    113c <main+0x1c>
lea    0xdc3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     130e <main+0x1ee>
movl   $0x3b9aca00,-0x180(%rbp)
ca 9a 3b
movl   $0x0,-0x174(%rbp)
cmpl   $0xa,-0x174(%rbp)
jge    12f7 <main+0x1d7>
lea    0xd7e(%rip),%rdi
lea    -0x17c(%rbp),%rsi
call   1040 <scanf@plt>
movslq -0x174(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x17c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x180(%rbp),%eax
jge    12de <main+0x1be>
movslq -0x174(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x17c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x180(%rbp)
jmp    12e3 <main+0x1c3>
mov    -0x174(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x174(%rbp)
jmp    126e <main+0x14e>
mov    -0x180(%rbp),%esi
lea    0xcff(%rip),%rdi
call   1030 <printf@plt>
jmp    1246 <main+0x126>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x180,%rsp
movaps 0xeca(%rip),%xmm0
movups %xmm0,0x34(%rsp)
movaps 0xece(%rip),%xmm0
movups %xmm0,0x44(%rsp)
movaps 0xed2(%rip),%xmm0
movups %xmm0,0x54(%rsp)
movaps 0xed6(%rip),%xmm0
movups %xmm0,0x64(%rsp)
movaps 0xeda(%rip),%xmm0
movups %xmm0,0x74(%rsp)
movaps 0xede(%rip),%xmm0
movups %xmm0,0x84(%rsp)
movaps 0xedf(%rip),%xmm0
movups %xmm0,0x94(%rsp)
movaps 0xee0(%rip),%xmm0
movups %xmm0,0xa4(%rsp)
movaps 0xee1(%rip),%xmm0
movups %xmm0,0xb4(%rsp)
movaps 0xee2(%rip),%xmm0
movups %xmm0,0xc4(%rsp)
movaps 0xee3(%rip),%xmm0
movups %xmm0,0xd4(%rsp)
movaps 0xee4(%rip),%xmm0
movups %xmm0,0xe4(%rsp)
movaps 0xee5(%rip),%xmm0
movups %xmm0,0xf4(%rsp)
movaps 0xee6(%rip),%xmm0
movups %xmm0,0x104(%rsp)
movaps 0xee7(%rip),%xmm0
movups %xmm0,0x114(%rsp)
movaps 0xee8(%rip),%xmm0
movups %xmm0,0x124(%rsp)
movaps 0xee9(%rip),%xmm0
movups %xmm0,0x134(%rsp)
movaps 0xeea(%rip),%xmm0
movups %xmm0,0x144(%rsp)
movaps 0xeeb(%rip),%xmm0
movups %xmm0,0x154(%rsp)
movaps 0xeec(%rip),%xmm0
movups %xmm0,0x164(%rsp)
movl   $0x3b9ac9ff,0x174(%rsp)
ff c9 9a 3b
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x3b9aca00,0x30(%rsp)
3b
lea    0xee2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     13d6 <main+0x2b6>
lea    0xec6(%rip),%r14
lea    0x8(%rsp),%rbx
mov    $0x3b9aca00,%r12d
lea    0xeb7(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x10(%rsp,%rax,4),%ebp
cmp    $0x3b9aca00,%ebp
cmovge %r12d,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x34(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x58(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x7c(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0xa0(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0xc4(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0xe8(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x10c(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x130(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movslq 0x8(%rsp),%rax
mov    0x154(%rsp,%rax,4),%eax
cmp    %ebp,%eax
cmovl  %eax,%ebp
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    12b0 <main+0x190>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x [9 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
br label %8
8: ; preds = %46, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 11
br i1 %10, label %11, label %49
11: ; preds = %8
%12 = load i32, i32* %4
%13 = load i32, i32* %4
%14 = srem i32 %13, 10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %3, i64 0, i64 %15
%17 = getelementptr inbounds [9 x i32], [9 x i32]* %16, i64 0, i64 0
store i32 %12, i32* %17
store i32 1, i32* %5
br label %18
18: ; preds = %42, %11
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 9
br i1 %20, label %21, label %45
21: ; preds = %18
%22 = load i32, i32* %4
%23 = srem i32 %22, 10
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %3, i64 0, i64 %24
%26 = load i32, i32* %5
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [9 x i32], [9 x i32]* %25, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = mul nsw i32 %30, 10
%32 = load i32, i32* %4
%33 = srem i32 %32, 10
%34 = add nsw i32 %31, %33
%35 = load i32, i32* %4
%36 = srem i32 %35, 10
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %3, i64 0, i64 %37
%39 = load i32, i32* %5
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [9 x i32], [9 x i32]* %38, i64 0, i64 %40
store i32 %34, i32* %41
br label %42
42: ; preds = %21
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %18
45: ; preds = %18
br label %46
46: ; preds = %45
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %8
49: ; preds = %8
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %51
51: ; preds = %82, %49
%52 = load i32, i32* %2
%53 = add nsw i32 %52, -1
store i32 %53, i32* %2
%54 = icmp ne i32 %52, 0
br i1 %54, label %55, label %85
55: ; preds = %51
store i32 1000000000, i32* %7
store i32 0, i32* %4
br label %56
56: ; preds = %79, %55
%57 = load i32, i32* %4
%58 = icmp slt i32 %57, 10
br i1 %58, label %59, label %82
59: ; preds = %56
%60 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %3, i64 0, i64 %62
%64 = load i32, i32* %6
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [9 x i32], [9 x i32]* %63, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = load i32, i32* %7
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %78
70: ; preds = %59
%71 = load i32, i32* %4
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %3, i64 0, i64 %72
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [9 x i32], [9 x i32]* %73, i64 0, i64 %75
%77 = load i32, i32* %76
store i32 %77, i32* %7
br label %78
78: ; preds = %70, %59
br label %79
79: ; preds = %78
%80 = load i32, i32* %4
%81 = add nsw i32 %80, 1
store i32 %81, i32* %4
br label %56
82: ; preds = %56
%83 = load i32, i32* %7
%84 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %83)
br label %51
85: ; preds = %51
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [9 x i32]]
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast [10 x [9 x i32]]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 0
store i32 1, i32* %7
%8 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 1
store i32 11, i32* %8
%9 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 2
store i32 111, i32* %9
%10 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 3
store i32 1111, i32* %10
%11 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 4
store i32 11111, i32* %11
%12 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 5
store i32 111111, i32* %12
%13 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 6
store i32 1111111, i32* %13
%14 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 7
store i32 11111111, i32* %14
%15 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 8
store i32 111111111, i32* %15
%16 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 0
store i32 2, i32* %16
%17 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 1
store i32 22, i32* %17
%18 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 2
store i32 222, i32* %18
%19 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 3
store i32 2222, i32* %19
%20 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 4
store i32 22222, i32* %20
%21 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 5
store i32 222222, i32* %21
%22 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 6
store i32 2222222, i32* %22
%23 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 7
store i32 22222222, i32* %23
%24 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 8
store i32 222222222, i32* %24
%25 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 0
store i32 3, i32* %25
%26 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 1
store i32 33, i32* %26
%27 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 2
store i32 333, i32* %27
%28 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 3
store i32 3333, i32* %28
%29 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 4
store i32 33333, i32* %29
%30 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 5
store i32 333333, i32* %30
%31 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 6
store i32 3333333, i32* %31
%32 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 7
store i32 33333333, i32* %32
%33 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 8
store i32 333333333, i32* %33
%34 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 0
store i32 4, i32* %34
%35 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 1
store i32 44, i32* %35
%36 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 2
store i32 444, i32* %36
%37 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 3
store i32 4444, i32* %37
%38 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 4
store i32 44444, i32* %38
%39 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 5
store i32 444444, i32* %39
%40 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 6
store i32 4444444, i32* %40
%41 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 7
store i32 44444444, i32* %41
%42 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 8
store i32 444444444, i32* %42
%43 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 0
store i32 5, i32* %43
%44 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 1
store i32 55, i32* %44
%45 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 2
store i32 555, i32* %45
%46 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 3
store i32 5555, i32* %46
%47 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 4
store i32 55555, i32* %47
%48 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 5
store i32 555555, i32* %48
%49 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 6
store i32 5555555, i32* %49
%50 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 7
store i32 55555555, i32* %50
%51 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 8
store i32 555555555, i32* %51
%52 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 0
store i32 6, i32* %52
%53 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 1
store i32 66, i32* %53
%54 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 2
store i32 666, i32* %54
%55 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 3
store i32 6666, i32* %55
%56 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 4
store i32 66666, i32* %56
%57 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 5
store i32 666666, i32* %57
%58 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 6
store i32 6666666, i32* %58
%59 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 7
store i32 66666666, i32* %59
%60 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 8
store i32 666666666, i32* %60
%61 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 0
store i32 7, i32* %61
%62 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 1
store i32 77, i32* %62
%63 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 2
store i32 777, i32* %63
%64 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 3
store i32 7777, i32* %64
%65 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 4
store i32 77777, i32* %65
%66 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 5
store i32 777777, i32* %66
%67 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 6
store i32 7777777, i32* %67
%68 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 7
store i32 77777777, i32* %68
%69 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 8
store i32 777777777, i32* %69
%70 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 0
store i32 8, i32* %70
%71 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 1
store i32 88, i32* %71
%72 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 2
store i32 888, i32* %72
%73 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 3
store i32 8888, i32* %73
%74 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 4
store i32 88888, i32* %74
%75 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 5
store i32 888888, i32* %75
%76 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 6
store i32 8888888, i32* %76
%77 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 7
store i32 88888888, i32* %77
%78 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 8
store i32 888888888, i32* %78
%79 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 0
store i32 9, i32* %79
%80 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 1
store i32 99, i32* %80
%81 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 2
store i32 999, i32* %81
%82 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 3
store i32 9999, i32* %82
%83 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 4
store i32 99999, i32* %83
%84 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 5
store i32 999999, i32* %84
%85 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 6
store i32 9999999, i32* %85
%86 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 7
store i32 99999999, i32* %86
%87 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 8
store i32 999999999, i32* %87
%88 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 0
store i32 10, i32* %88
%89 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 1
store i32 100, i32* %89
%90 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 2
store i32 1000, i32* %90
%91 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 3
store i32 10000, i32* %91
%92 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 4
store i32 100000, i32* %92
%93 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 5
store i32 1000000, i32* %93
%94 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 6
store i32 10000000, i32* %94
%95 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 7
store i32 100000000, i32* %95
%96 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 8
store i32 1000000000, i32* %96
%97 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%98 = load i32, i32* %1
%99 = add nsw i32 %98, -1
store i32 %99, i32* %1
%100 = icmp eq i32 %98, 0
br i1 %100, label %176, label %101
101: ; preds = %0, %101
%102 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%103 = load i32, i32* %3
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 0, i64 %104
%106 = load i32, i32* %105
%107 = icmp slt i32 %106, 1000000000
%108 = select i1 %107, i32 %106, i32 1000000000
%109 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%110 = load i32, i32* %3
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 1, i64 %111
%113 = load i32, i32* %112
%114 = icmp slt i32 %113, %108
%115 = select i1 %114, i32 %113, i32 %108
%116 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%117 = load i32, i32* %3
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 2, i64 %118
%120 = load i32, i32* %119
%121 = icmp slt i32 %120, %115
%122 = select i1 %121, i32 %120, i32 %115
%123 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%124 = load i32, i32* %3
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 3, i64 %125
%127 = load i32, i32* %126
%128 = icmp slt i32 %127, %122
%129 = select i1 %128, i32 %127, i32 %122
%130 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%131 = load i32, i32* %3
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 4, i64 %132
%134 = load i32, i32* %133
%135 = icmp slt i32 %134, %129
%136 = select i1 %135, i32 %134, i32 %129
%137 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%138 = load i32, i32* %3
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 5, i64 %139
%141 = load i32, i32* %140
%142 = icmp slt i32 %141, %136
%143 = select i1 %142, i32 %141, i32 %136
%144 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%145 = load i32, i32* %3
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 6, i64 %146
%148 = load i32, i32* %147
%149 = icmp slt i32 %148, %143
%150 = select i1 %149, i32 %148, i32 %143
%151 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%152 = load i32, i32* %3
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 7, i64 %153
%155 = load i32, i32* %154
%156 = icmp slt i32 %155, %150
%157 = select i1 %156, i32 %155, i32 %150
%158 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%159 = load i32, i32* %3
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 8, i64 %160
%162 = load i32, i32* %161
%163 = icmp slt i32 %162, %157
%164 = select i1 %163, i32 %162, i32 %157
%165 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%166 = load i32, i32* %3
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds [10 x [9 x i32]], [10 x [9 x i32]]* %2, i64 0, i64 9, i64 %167
%169 = load i32, i32* %168
%170 = icmp slt i32 %169, %164
%171 = select i1 %170, i32 %169, i32 %164
%172 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %171)
%173 = load i32, i32* %1
%174 = add nsw i32 %173, -1
store i32 %174, i32* %1
%175 = icmp eq i32 %173, 0
br i1 %175, label %176, label %101
176: ; preds = %101, %0
ret i32 0
}