#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*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ stdout;
int main(void) {
  int casos;
  char a[64], b[64];
  char *pa, *pb;
  scanf("%d\n", &casos);
  while (casos-- > 0) {
    scanf("%s %s\n", a, b);
    pa = a;
    pb = b;
    while (*pa != '\0' && *pb != '\0') {
      putc(*pa, stdout);
      putc(*pb, stdout);
      pa++;
      pb++;
    }
    while (*pa != '\0') {
      putc(*pa, stdout);
      pa++;
    }
    while (*pb != '\0') {
      putc(*pb, stdout);
      pb++;
    }
    putc('\n', stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    12d5 <main+0x1b5>
lea    -0x50(%rbp),%rsi
lea    -0x90(%rbp),%rdx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x98(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa1(%rbp)
je     11bb <main+0x9b>
mov    -0xa0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
test   $0x1,%al
jne    11ce <main+0xae>
jmp    122b <main+0x10b>
mov    -0x98(%rbp),%rax
mov    (%rax),%al
mov    0x2e02(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    -0xa0(%rbp),%rax
mov    (%rax),%al
mov    0x2de8(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
jmp    118a <main+0x6a>
jmp    1230 <main+0x110>
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1274 <main+0x154>
mov    -0x98(%rbp),%rax
mov    (%rax),%al
mov    0x2d8d(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
jmp    1230 <main+0x110>
jmp    1279 <main+0x159>
mov    -0xa0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12bd <main+0x19d>
mov    -0xa0(%rbp),%rax
mov    (%rax),%al
mov    0x2d44(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
jmp    1279 <main+0x159>
mov    0x2d1c(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    124b <main+0x12b>
lea    0x50(%rsp),%r13
lea    0x10(%rsp),%r14
mov    0x2e78(%rip),%rbx
jmp    118f <main+0x6f>
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    124b <main+0x12b>
lea    0xe6e(%rip),%rdi
mov    %r14,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%al
mov    %r13,%rbp
test   %al,%al
je     1217 <main+0xf7>
lea    0x11(%rsp),%r12
mov    %r13,%rbp
mov    %r14,%r15
nopl   0x0(%rax)
cmpb   $0x0,0x0(%rbp)
je     1200 <main+0xe0>
mov    (%rbx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
movsbl 0x0(%rbp),%edi
mov    (%rbx),%esi
call   1030 <putc@plt>
add    $0x1,%rbp
movzbl 0x1(%r15),%eax
add    $0x1,%r15
add    $0x1,%r12
test   %al,%al
jne    11c0 <main+0xa0>
jmp    1217 <main+0xf7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%r12),%eax
add    $0x1,%r12
test   %al,%al
jne    1200 <main+0xe0>
mov    0x0(%rbp),%al
test   %al,%al
je     1170 <main+0x50>
add    $0x1,%rbp
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx),%esi
movsbl %al,%edi
call   1030 <putc@plt>
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1230 <main+0x110>
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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