#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 fread(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int getchar();
int /*<<< orphan*/ scanf(char *, int *, int *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int arg, char *argv[]) {
  int ch;
  {
    while ((ch = getchar()) != '\n') {
    }
  }
  {
    while ((ch = getchar()) != '\n') {
    }
    while ((ch = getchar()) != '\n') {
    }
  }
  {
    while ((ch = getchar()) != '\n') {
    }
    while ((ch = getchar()) != '\n') {
    }
  }
  {
    while ((ch = getchar()) != '\n') {
    }
    while ((ch = getchar()) != '\n') {
    }
    int x, y, c;
    scanf("%d %d %d", &x, &y, &c);
    int i;
    for (i = 0; i < c; i++) {
      int a, b;
      scanf("%d %d", &a, &b);
    }
  }
  ch = getchar();
  char x[16384];
  for (;;) {
    int r = fread(x, sizeof(char), 16384, stdin);
    if (r == 0)
      break;
    fwrite(x, sizeof(char), r, stdout);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     1171 <main+0x31>
jmp    1159 <main+0x19>
jmp    1176 <main+0x36>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     118e <main+0x4e>
jmp    1176 <main+0x36>
jmp    1193 <main+0x53>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     11ab <main+0x6b>
jmp    1193 <main+0x53>
jmp    11b0 <main+0x70>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     11c8 <main+0x88>
jmp    11b0 <main+0x70>
jmp    11cd <main+0x8d>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     11e5 <main+0xa5>
jmp    11cd <main+0x8d>
jmp    11ea <main+0xaa>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     1202 <main+0xc2>
jmp    11ea <main+0xaa>
jmp    1207 <main+0xc7>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xa,%eax
je     121f <main+0xdf>
jmp    1207 <main+0xc7>
lea    0xdda(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1270 <main+0x130>
lea    0xdb0(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1240 <main+0x100>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
lea    -0x4030(%rbp),%rdi
mov    0x2d60(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
mov    $0x4000,%edx
call   1030 <fread@plt>
mov    %eax,-0x4034(%rbp)
cmpl   $0x0,-0x4034(%rbp)
jne    12b1 <main+0x171>
jmp    12d6 <main+0x196>
lea    -0x4030(%rbp),%rdi
mov    -0x4034(%rbp),%edx
mov    0x2d13(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1060 <fwrite@plt>
jmp    127a <main+0x13a>
mov    -0x4(%rbp),%eax
add    $0x4040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x4018,%rsp
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1150 <main+0x10>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1160 <main+0x20>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1170 <main+0x30>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1180 <main+0x40>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1190 <main+0x50>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    11a0 <main+0x60>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    11b0 <main+0x70>
lea    0xe3d(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rsp,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1208 <main+0xc8>
lea    0xe1f(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%ebp
cmp    (%rsp),%ebp
jl     11f0 <main+0xb0>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2dd2(%rip),%r14
mov    (%r14),%ecx
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x4000,%edx
call   1030 <fread@plt>
test   %eax,%eax
je     126b <main+0x12b>
mov    0x2da0(%rip),%r15
lea    0x10(%rsp),%rbx
nopl   (%rax)
mov    (%r15),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1060 <fwrite@plt>
mov    (%r14),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x4000,%edx
call   1030 <fread@plt>
test   %eax,%eax
jne    1240 <main+0x100>
xor    %eax,%eax
add    $0x4018,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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