#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 *, int *, int *);
int main(void) {
  int a, b, c;
  while (scanf("%d %d %d\n", &a, &b, &c) != EOF) {
    if (a == b && b == c) {
      printf("*\n");
    } else if (a == b) {
      printf("C\n");
    } else if (b == c) {
      printf("A\n");
    } else {
      printf("B\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
je     11d5 <main+0xb5>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1180 <main+0x60>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1180 <main+0x60>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    11d0 <main+0xb0>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    119d <main+0x7d>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xab>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ba <main+0x9a>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xab>
jmp    11d0 <main+0xb0>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x2e98(%rip),%r13
cmp    0x0(%r13),%rax
je     11d0 <main+0xb0>
lea    0xeb1(%rip),%rbp
lea    0xe9c(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rsp),%eax
cmp    0xc(%rsp),%eax
mov    %rbp,%rdi
lea    0xe7e(%rip),%rdx
cmove  %rdx,%rdi
lea    0xe6d(%rip),%rcx
lea    0xe68(%rip),%rdx
cmove  %rdx,%rcx
cmp    %eax,0x14(%rsp)
cmovne %rbp,%rdi
cmovne %rcx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %d\0A\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"*\0A\00"
@.str.2 = [3 x i8] c"C\0A\00"
@.str.3 = [3 x i8] c"A\0A\00"
@.str.4 = [3 x i8] c"B\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %35, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %36
9: ; preds = %5
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %35
19: ; preds = %13, %9
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %34
25: ; preds = %19
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %33
31: ; preds = %25
%32 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %33
33: ; preds = %31, %29
br label %34
34: ; preds = %33, %23
br label %35
35: ; preds = %34, %17
br label %5
36: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
@EOF = global i64 0
@str = [2 x i8] c"B\00"
@str.5 = [2 x i8] c"A\00"
@str.6 = [2 x i8] c"C\00"
@str.7 = [2 x i8] c"*\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %24, label %10
10: ; preds = %0, %10
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = icmp eq i32 %11, %12
%14 = load i32, i32* %3
%15 = icmp eq i32 %12, %14
%16 = select i1 %13, i1 %15, i1 false
%17 = select i1 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0)
%18 = select i1 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%19 = select i1 %13, i8* %17, i8* %18
%20 = call i32 @puts(i8* dereferenceable(1) %19)
%21 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%22 = load i64, i64* @EOF
%23 = icmp eq i64 %21, %22
br i1 %23, label %24, label %10
24: ; preds = %10, %0
ret i32 0
}