#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 */
scalar_t__ EOF;
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ putchar(char);
scalar_t__ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main() {
  int n, m, i, u, L;
  char ar[9999];
  while (scanf("%d", &n) != EOF) {
    getchar();
    for (m = 1; m <= n; m++) {
      fgets(ar, 9999, stdin);
      ar[5] = '6';
      for (i = 5; i < 11; i++)
        printf("%c", ar[i]);
      putchar('\n');
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
mov    0x2e67(%rip),%rcx
cmp    (%rcx),%rax
je     1211 <main+0xc1>
mov    $0x0,%al
call   1060 <getchar@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     120c <main+0xbc>
lea    -0x2730(%rbp),%rdi
mov    0x2e3e(%rip),%rax
mov    (%rax),%edx
mov    $0x270f,%esi
call   1050 <fgets@plt>
movb   $0x36,-0x272b(%rbp)
movl   $0x5,-0x10(%rbp)
cmpl   $0xb,-0x10(%rbp)
jge    11f4 <main+0xa4>
movslq -0x10(%rbp),%rax
lea    0xe2a(%rip),%rdi
movsbl -0x2730(%rbp,%rax,1),%esi
ff
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11c4 <main+0x74>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1190 <main+0x40>
jmp    1162 <main+0x12>
xor    %eax,%eax
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2728,%rsp
lea    0xe98(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x2e67(%rip),%r13
cmp    0x0(%r13),%rax
jne    1193 <main+0x43>
xor    %eax,%eax
add    $0x2728,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc(%rsp),%r15
mov    0x2e49(%rip),%rbp
lea    0x10(%rsp),%r12
lea    0xe58(%rip),%rbx
jmp    11c5 <main+0x75>
nopl   (%rax)
lea    0xe49(%rip),%rdi
mov    %r15,%rsi
call   1070 <scanf@plt>
cmp    0x0(%r13),%rax
je     117f <main+0x2f>
xor    %eax,%eax
call   1060 <getchar@plt>
cmpl   $0x0,0xc(%rsp)
jle    11b0 <main+0x60>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%rbp),%edx
mov    %r12,%rdi
mov    $0x270f,%esi
call   1050 <fgets@plt>
movb   $0x36,0x15(%rsp)
mov    %rbx,%rdi
mov    $0x36,%esi
call   1040 <printf@plt>
movsbl 0x16(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x17(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x18(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x19(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movsbl 0x1a(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
cmp    0xc(%rsp),%r14d
jl     11e0 <main+0x90>
jmp    11b0 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@stdin = global i32 0
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [9999 x i8]
store i32 0, i32* %1
br label %8
8: ; preds = %40, %0
%9 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %41
12: ; preds = %8
%13 = call i32 (...) @getchar()
store i32 1, i32* %3
br label %14
14: ; preds = %37, %12
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %40
18: ; preds = %14
%19 = getelementptr inbounds [9999 x i8], [9999 x i8]* %7, i64 0, i64 0
%20 = load i32, i32* @stdin
%21 = call i32 @fgets(i8* %19, i32 9999, i32 %20)
%22 = getelementptr inbounds [9999 x i8], [9999 x i8]* %7, i64 0, i64 5
store i8 54, i8* %22
store i32 5, i32* %4
br label %23
23: ; preds = %32, %18
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 11
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [9999 x i8], [9999 x i8]* %7, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %30)
br label %32
32: ; preds = %26
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %23
35: ; preds = %23
%36 = call i32 @putchar(i8 signext 10)
br label %37
37: ; preds = %35
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %14
40: ; preds = %14
br label %8
41: ; preds = %8
ret i32 0
}

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