#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 /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main() {
  int n, s1 = -1, s2 = -1;
  char b[11], t1[11], t2[11];
  scanf("%d\n", &n);
  while (n--) {
    scanf("%s", b);
    if (s1 < 0) {
      strncpy(t1, b, 11);
      ++s1;
    } else if (!strcmp(b, t1))
      ++s1;
    else if (s2 < 0) {
      strncpy(t2, b, 11);
      ++s2;
    } else
      ++s2;
  }
  printf(s1 > s2 ? t1 : t2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1225 <main+0xe5>
lea    -0x1b(%rbp),%rsi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jge    11bf <main+0x7f>
lea    -0x26(%rbp),%rdi
lea    -0x1b(%rbp),%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1220 <main+0xe0>
lea    -0x1b(%rbp),%rdi
lea    -0x26(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11e3 <main+0xa3>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    121b <main+0xdb>
cmpl   $0x0,-0x10(%rbp)
jge    120d <main+0xcd>
lea    -0x31(%rbp),%rdi
lea    -0x1b(%rbp),%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1216 <main+0xd6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    121b <main+0xdb>
jmp    1220 <main+0xe0>
jmp    116f <main+0x2f>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    123e <main+0xfe>
lea    -0x26(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    1246 <main+0x106>
lea    -0x31(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xeab(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xffffffff,%ebx
subl   $0x1,(%rsp)
mov    $0xffffffff,%ebp
jae    1195 <main+0x55>
cmp    %ebp,%ebx
lea    0x12(%rsp),%rax
lea    0x7(%rsp),%rdi
cmovg  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffff,%ebp
lea    0xe63(%rip),%r14
lea    0x1d(%rsp),%r13
lea    0x12(%rsp),%r15
lea    0x7(%rsp),%r12
mov    $0xffffffff,%ebx
jmp    11e9 <main+0xa9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
subl   $0x1,(%rsp)
jae    11e9 <main+0xa9>
jmp    116f <main+0x2f>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r13,%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
add    $0x1,%ebx
subl   $0x1,(%rsp)
jb     116f <main+0x2f>
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
test   %ebx,%ebx
js     11d0 <main+0x90>
mov    %r13,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11e0 <main+0xa0>
test   %ebp,%ebp
jns    11c0 <main+0x80>
mov    %r12,%rdi
mov    %r13,%rsi
mov    $0xb,%edx
call   1030 <strncpy@plt>
jmp    11c0 <main+0x80>

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

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