#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__ check(char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char sets[12][5];
  for (int i = 0; i < 12; i++)
    scanf("%s", sets[i]);
  int found = 0;
  for (int i = 0; i < 12; i++) {
    for (int j = i + 1; j < 12; j++) {
      for (int k = j + 1; k < 12; k++) {
        if (check(sets[i], sets[j], sets[k])) {
          printf("%d %d %d\n", i + 1, j + 1, k + 1);
          found = 1;
        }
      }
    }
  }
  if (!found)
    printf("no sets\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xc,-0x44(%rbp)
jge    1179 <main+0x49>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0x5,%rax,%rax
add    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1146 <main+0x16>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0xc,-0x4c(%rbp)
jge    1253 <main+0x123>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
cmpl   $0xc,-0x50(%rbp)
jge    1240 <main+0x110>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
cmpl   $0xc,-0x54(%rbp)
jge    122d <main+0xfd>
movslq -0x4c(%rbp),%rax
lea    -0x40(%rbp),%rdi
imul   $0x5,%rax,%rax
add    %rax,%rdi
movslq -0x50(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0x5,%rax,%rax
add    %rax,%rsi
movslq -0x54(%rbp),%rax
lea    -0x40(%rbp),%rdx
imul   $0x5,%rax,%rax
add    %rax,%rdx
call   1050 <check@plt>
cmp    $0x0,%rax
je     121a <main+0xea>
mov    -0x4c(%rbp),%esi
add    $0x1,%esi
mov    -0x50(%rbp),%edx
add    $0x1,%edx
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x48(%rbp)
jmp    121f <main+0xef>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11ad <main+0x7d>
jmp    1232 <main+0x102>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    119a <main+0x6a>
jmp    1245 <main+0x115>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1187 <main+0x57>
cmpl   $0x0,-0x48(%rbp)
jne    126b <main+0x13b>
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xeab(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x25(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x2a(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x2f(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x39(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x3e(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x43(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4d(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x52(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x57(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    $0x1,%r12d
xor    %r15d,%r15d
movl   $0x0,0x4(%rsp)
jmp    122c <main+0xec>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%r12
add    $0x1,%r12
mov    0x10(%rsp),%r14
add    $0x5,%r14
cmp    $0xc,%r15
je     12e3 <main+0x1a3>
mov    %r15,%rax
add    $0x1,%r15
cmp    $0xa,%rax
mov    %r14,0x10(%rsp)
mov    %r12,0x8(%rsp)
ja     1210 <main+0xd0>
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,1),%rbx
add    $0x20,%rbx
jmp    126f <main+0x12f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%r14
add    $0x5,%r14
cmp    $0xc,%r12
je     1210 <main+0xd0>
mov    %r12,%r13
add    $0x1,%r12
cmp    $0xa,%r13
mov    %r14,0x18(%rsp)
ja     1260 <main+0x120>
lea    0x0(,%r13,4),%rax
add    %r13,%rax
lea    (%rsp,%rax,1),%rbp
add    $0x20,%rbp
jmp    12ae <main+0x16e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r13
add    $0x5,%r14
cmp    $0xb,%r13
jae    1260 <main+0x120>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1060 <check@plt>
test   %rax,%rax
je     12a0 <main+0x160>
lea    0x2(%r13),%ecx
lea    0xd37(%rip),%rdi
mov    %r15d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,0x4(%rsp)
jmp    12a0 <main+0x160>
cmpl   $0x0,0x4(%rsp)
jne    12f6 <main+0x1b6>
lea    0xd1c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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