#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__ containsDrop(char *, size_t);
int /*<<< orphan*/ func(char *, size_t, int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
size_t strlen(char *);
int main() {
  char command[100001];
  int list[100000];
  int n;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", command);
    size_t cmd_len = strlen(command);
    int list_len;
    scanf("%d", &list_len);
    if (list_len == 0) {
      char dump[3];
      scanf("%s", dump);
      printf(containsDrop(command, cmd_len) ? "error\n" : "[]\n");
    } else {
      char dump;
      scanf(" %c", &dump);
      scanf("%d", list);
      for (int i = 1; i < list_len; i++)
        scanf(",%d", list + i);
      scanf("%c", &dump);
      func(command, cmd_len, list, 0, list_len - 1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a150,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x7a134(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x7a134(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x7a134(%rbp)
cmp    $0x0,%eax
je     12e4 <main+0x194>
lea    -0x186b0(%rbp),%rsi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x186b0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x7a140(%rbp)
lea    0xe53(%rip),%rdi
lea    -0x7a144(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
cmpl   $0x0,-0x7a144(%rbp)
jne    1226 <main+0xd6>
lea    -0x7a147(%rbp),%rsi
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x186b0(%rbp),%rdi
mov    -0x7a140(%rbp),%rsi
call   1060 <containsDrop@plt>
mov    %rax,%rcx
lea    0xdfd(%rip),%rdi
lea    0xdef(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
call   1040 <printf@plt>
jmp    12df <main+0x18f>
lea    0xde1(%rip),%rdi
lea    -0x7a148(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x7a130(%rbp),%rsi
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
movl   $0x1,-0x7a14c(%rbp)
mov    -0x7a14c(%rbp),%eax
cmp    -0x7a144(%rbp),%eax
jge    12a3 <main+0x153>
lea    -0x7a130(%rbp),%rsi
movslq -0x7a14c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x7a14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a14c(%rbp)
jmp    125a <main+0x10a>
lea    0xd65(%rip),%rdi
lea    -0x7a148(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x186b0(%rbp),%rdi
mov    -0x7a140(%rbp),%rsi
lea    -0x7a130(%rbp),%rdx
mov    -0x7a144(%rbp),%r8d
sub    $0x1,%r8d
xor    %ecx,%ecx
call   1050 <func@plt>
jmp    1177 <main+0x27>
xor    %eax,%eax
add    $0x7a150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7a148,%rsp
lea    0xeab(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
subl   $0x1,0x8(%rsp)
jb     12cd <main+0x17d>
lea    0xe7a(%rip),%rbx
lea    0x10(%rsp),%rbp
lea    0xe81(%rip),%r14
lea    0xd(%rsp),%r15
lea    0xe74(%rip),%r12
jmp    11eb <main+0x9b>
lea    0xe68(%rip),%rdi
mov    %rbx,%r15
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x4(%rsp),%r8d
add    $0xffffffff,%r8d
mov    %rbp,%rdi
mov    %r13,%rsi
lea    0x186c0(%rsp),%rdx
xor    %ecx,%ecx
call   1050 <func@plt>
lea    0xe27(%rip),%rbx
lea    0xe33(%rip),%r14
subl   $0x1,0x8(%rsp)
jb     12cd <main+0x17d>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %rbp,%rdi
call   1030 <strlen@plt>
mov    %rax,%r13
mov    %r14,%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
je     1290 <main+0x140>
lea    0xdee(%rip),%rdi
mov    %r15,%rbx
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r14,%rdi
lea    0x186c0(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
cmpl   $0x2,0x4(%rsp)
jl     11a0 <main+0x50>
mov    $0x1,%r15d
lea    0x186c4(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
add    $0x1,%r15
movslq 0x4(%rsp),%rax
add    $0x4,%r14
cmp    %rax,%r15
jl     1260 <main+0x110>
jmp    11a0 <main+0x50>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1060 <containsDrop@plt>
test   %rax,%rax
lea    0xd51(%rip),%rdi
lea    0xd51(%rip),%rax
cmove  %rax,%rdi
call   1040 <printf@plt>
subl   $0x1,0x8(%rsp)
jae    11eb <main+0x9b>
xor    %eax,%eax
add    $0x7a148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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