#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
size_t strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int main() {
  int n;
  scanf("%d\n", &n);
  char buffer[1001];
  while (n-- > 0) {
    fgets(buffer, 1001, stdin);
    size_t len = strlen(buffer);
    if (len <= 11 || strncmp(buffer, "simon says ", 11))
      printf("\n");
    else
      printf("%s\n", buffer + 11);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    1214 <main+0xc4>
lea    -0x400(%rbp),%rdi
mov    0x2e54(%rip),%rax
mov    (%rax),%edx
mov    $0x3e9,%esi
call   1060 <fgets@plt>
lea    -0x400(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x408(%rbp)
cmpq   $0xb,-0x408(%rbp)
0b
jbe    11e3 <main+0x93>
lea    -0x400(%rbp),%rdi
lea    0xe35(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     11f6 <main+0xa6>
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    120f <main+0xbf>
lea    -0x400(%rbp),%rsi
add    $0xb,%rsi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1172 <main+0x22>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
lea    0xe8b(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    1207 <main+0xa7>
lea    0x1b(%rsp),%r14
mov    0x2e4e(%rip),%r12
lea    0x10(%rsp),%rbx
lea    0xe5e(%rip),%r15
jmp    11c9 <main+0x69>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    1207 <main+0xa7>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x3e9,%esi
call   1070 <fgets@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0xc,%rax
jb     11b0 <main+0x50>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xb,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    11b0 <main+0x50>
mov    %r14,%rdi
call   1050 <puts@plt>
jmp    11ba <main+0x5a>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@stdin = global i32 0
@.str.1 = [12 x i8] c"simon says \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1001 x i8]
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %28, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp sgt i32 %7, 0
br i1 %9, label %10, label %29
10: ; preds = %6
%11 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 1001, i32 %12)
%14 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%15 = call i64 @strlen(i8* %14)
store i64 %15, i64* %4
%16 = load i64, i64* %4
%17 = icmp ule i64 %16, 11
br i1 %17, label %22, label %18
18: ; preds = %10
%19 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%20 = call i64 @strncmp(i8* %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 11)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18, %10
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %28
24: ; preds = %18
%25 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%26 = getelementptr inbounds i8, i8* %25, i64 11
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %24, %22
br label %6
29: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@stdin = global i32 0
@.str.1 = [12 x i8] c"simon says \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x i8]
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %27
9: ; preds = %0
%10 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 11
br label %11
11: ; preds = %9, %23
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %5, i32 1001, i32 %12)
%14 = call i64 @strlen(i8* %5)
%15 = icmp ult i64 %14, 12
br i1 %15, label %19, label %16
16: ; preds = %11
%17 = call i64 @strncmp(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 11)
%18 = icmp eq i64 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16, %11
%20 = call i32 @putchar(i32 10)
br label %23
21: ; preds = %16
%22 = call i32 @puts(i8* %10)
br label %23
23: ; preds = %21, %19
%24 = load i32, i32* %1
%25 = add nsw i32 %24, -1
store i32 %25, i32* %1
%26 = icmp sgt i32 %24, 0
br i1 %26, label %11, label %27
27: ; preds = %23, %0
ret i32 0
}