#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*/ printf(char *, ...);
scalar_t__ scanf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int main() {
  int n, m, i, j;
  char no[1000][100], name[1000][100], sex[1000][5];
  int age[1000];
  char tmp[100];
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++)
      scanf("%s%s%s%d", no[i], name[i], sex[i], &age[i]);
    scanf("%d", &m);
    for (i = 0; i < m; i++) {
      scanf("%s", tmp);
      for (j = 0; j < n; j++) {
        if (!strcmp(tmp, no[j])) {
          printf("%s %s %s %d\n", no[j], name[j], sex[j], age[j]);
          break;
        } else if (j == n - 1)
          printf("No Answer!\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x33100,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
je     12f3 <main+0x1c3>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11db <main+0xab>
movslq -0x10(%rbp),%rax
lea    -0x186c0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
movslq -0x10(%rbp),%rax
lea    -0x30d60(%rbp),%rdx
imul   $0x64,%rax,%rax
add    %rax,%rdx
movslq -0x10(%rbp),%rax
lea    -0x320f0(%rbp),%rcx
imul   $0x5,%rax,%rax
add    %rax,%rcx
movslq -0x10(%rbp),%rax
lea    -0x33090(%rbp),%r8
shl    $0x2,%rax
add    %rax,%r8
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116b <main+0x3b>
lea    0xe24(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12ee <main+0x1be>
lea    -0x33100(%rbp),%rsi
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12db <main+0x1ab>
lea    -0x33100(%rbp),%rdi
movslq -0x14(%rbp),%rax
lea    -0x186c0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12a4 <main+0x174>
movslq -0x14(%rbp),%rax
lea    -0x186c0(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
movslq -0x14(%rbp),%rax
lea    -0x30d60(%rbp),%rdx
imul   $0x64,%rax,%rax
add    %rax,%rdx
movslq -0x14(%rbp),%rax
lea    -0x320f0(%rbp),%rcx
imul   $0x5,%rax,%rax
add    %rax,%rcx
movslq -0x14(%rbp),%rax
mov    -0x33090(%rbp,%rax,4),%r8d
ff
lea    0xd74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12db <main+0x1ab>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    12c3 <main+0x193>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12c8 <main+0x198>
jmp    12cd <main+0x19d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    121c <main+0xec>
jmp    12e0 <main+0x1b0>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11f4 <main+0xc4>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x33100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x330f8,%rsp
lea    0xeae(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x2e7d(%rip),%rcx
cmp    (%rcx),%rax
jne    1184 <main+0x44>
xor    %eax,%eax
add    $0x330f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe75(%rip),%r13
jmp    11b6 <main+0x76>
nopl   (%rax)
lea    0xe6f(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x2e3e(%rip),%rcx
cmp    (%rcx),%rax
lea    0xe4c(%rip),%r13
je     1170 <main+0x30>
cmpl   $0x0,0x8(%rsp)
jle    1214 <main+0xd4>
lea    0x1020(%rsp),%r14
lea    0x23b0(%rsp),%r12
lea    0x1aa50(%rsp),%r15
lea    0x80(%rsp),%rbx
xor    %ebp,%ebp
nop
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1060 <scanf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
add    $0x4,%rbx
add    $0x64,%r15
add    $0x64,%r12
add    $0x5,%r14
cmp    %rax,%rbp
jl     11e0 <main+0xa0>
lea    0xdeb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1190 <main+0x50>
xor    %ebx,%ebx
jmp    126c <main+0x12c>
cs nopw 0x0(%rax,%rax,1)
mov    0x80(%rsp,%r13,4),%r8d
lea    0xdbd(%rip),%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jge    1190 <main+0x50>
lea    0xd96(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%r15d
test   %r15d,%r15d
jle    125f <main+0x11f>
lea    0x1aa50(%rsp),%rbp
lea    0x1020(%rsp),%r14
lea    0x23b0(%rsp),%r12
xor    %r13d,%r13d
jmp    12c8 <main+0x188>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r13
movslq %r15d,%rax
add    $0x64,%r12
add    $0x5,%r14
add    $0x64,%rbp
cmp    %rax,%r13
jge    125f <main+0x11f>
lea    0x10(%rsp),%rdi
mov    %rbp,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1240 <main+0x100>
lea    -0x1(%r15),%eax
cmp    %rax,%r13
jne    12b0 <main+0x170>
lea    0xd2c(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%r15d
jmp    12b0 <main+0x170>

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

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