QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#201852#5156. Going in CirclesBoulevardDust#AC ✓22ms4052kbC++201.4kb2023-10-05 17:04:232023-10-05 17:04:23

Judging History

你现在查看的是最新测评结果

  • [2023-10-05 17:04:23]
  • 评测
  • 测评结果:AC
  • 用时:22ms
  • 内存:4052kb
  • [2023-10-05 17:04:23]
  • 提交

answer

#include <iostream>
#include <cstdio>
#include <ctime>

using namespace std;

int x, cnt;

void left() {
	++cnt;
	puts("? left");
	fflush(stdout);
	scanf("%d", &x);
}
void right() {
	++cnt;
	puts("? right");
	fflush(stdout);
	scanf("%d", &x);
}
void flip() {
	++cnt;
	puts("? flip");
	fflush(stdout);
	scanf("%d", &x);
}

int s[10005], t[10005], nxt[10005], f[10005];

int main() {
	srand(time(0));
	scanf("%d", &x);
	if(x) flip();
	while(cnt < 500) {
		int t = 0;
		do {
			++t;
			right();
			if(cnt >= 500) break;
		}while(x);
		if(cnt >= 500) break;
		for(int i = 1; i <= t; ++i) {
			left();
			if(cnt >= 500) break;
		}
		if(cnt >= 500) break;
		flip();
		if(cnt >= 500) break;
		for(int i = 1; i <= t; ++i) {
			right();
			if(cnt >= 500) break;
		}
		if(cnt >= 500) break;
		if(x) {
			return printf("! %d", t), fflush(stdout), 0;
		}
	}
	for(int i = 1; i <= 80; ++i) {
		t[i] = rand() & 1;
	}
	for(int i = 1; i <= 80; ++i) {
		right();
		if(x != t[i]) flip();
	}
	nxt[1] = 0;
	for(int i = 2, j = 0; i <= 80; ++i) {
		while(j > 0 && t[i] != t[j + 1]) j = nxt[j];
		if(t[i] == t[j + 1]) ++j;
		nxt[i] = j;
	}
	int i = 0, j = 0, ans = 0;
	while(1) {
		right(), ++ans;
		s[++i] = x;
		while(j > 0 && s[i] != t[j + 1]) j = nxt[j];
		if(s[i] == t[j + 1]) ++j;
		if(j == 80) return printf("! %d", ans), fflush(stdout), 0;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3888kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? righ...

result:

ok Queries used; 5619.

Test #2:

score: 0
Accepted
time: 4ms
memory: 4048kb

input:

1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? righ...

result:

ok Queries used; 5477.

Test #3:

score: 0
Accepted
time: 4ms
memory: 3964kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right...

result:

ok Queries used; 5620.

Test #4:

score: 0
Accepted
time: 0ms
memory: 3904kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? le...

result:

ok Queries used; 4716.

Test #5:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? le...

result:

ok Queries used; 4715.

Test #6:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? le...

result:

ok Queries used; 4716.

Test #7:

score: 0
Accepted
time: 5ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5612.

Test #8:

score: 0
Accepted
time: 3ms
memory: 3960kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5466.

Test #9:

score: 0
Accepted
time: 0ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5613.

Test #10:

score: 0
Accepted
time: 2ms
memory: 3892kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4708.

Test #11:

score: 0
Accepted
time: 6ms
memory: 3972kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4718.

Test #12:

score: 0
Accepted
time: 0ms
memory: 4044kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4719.

Test #13:

score: 0
Accepted
time: 2ms
memory: 4012kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right...

result:

ok Queries used; 319.

Test #14:

score: 0
Accepted
time: 6ms
memory: 3948kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
...

result:

ok Queries used; 2311.

Test #15:

score: 0
Accepted
time: 4ms
memory: 4036kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3823.

Test #16:

score: 0
Accepted
time: 12ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5513.

Test #17:

score: 0
Accepted
time: 4ms
memory: 3964kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5447.

Test #18:

score: 0
Accepted
time: 10ms
memory: 3856kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? rig...

result:

ok Queries used; 5428.

Test #19:

score: 0
Accepted
time: 12ms
memory: 3976kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 5445.

Test #20:

score: 0
Accepted
time: 6ms
memory: 3972kb

input:

0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? fli...

result:

ok Queries used; 5544.

Test #21:

score: 0
Accepted
time: 0ms
memory: 4044kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? lef...

result:

ok Queries used; 5613.

Test #22:

score: 0
Accepted
time: 3ms
memory: 3964kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 5145.

Test #23:

score: 0
Accepted
time: 9ms
memory: 3888kb

input:

1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? rig...

result:

ok Queries used; 5336.

Test #24:

score: 0
Accepted
time: 0ms
memory: 3980kb

input:

0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
...

output:

? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? l...

result:

ok Queries used; 5494.

Test #25:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5063.

Test #26:

score: 0
Accepted
time: 10ms
memory: 3980kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5503.

Test #27:

score: 0
Accepted
time: 0ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5540.

Test #28:

score: 0
Accepted
time: 11ms
memory: 4040kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4602.

Test #29:

score: 0
Accepted
time: 1ms
memory: 3864kb

input:

1
0
1
1
0
1
1
0
1
1
1
1

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
! 3

result:

ok Queries used; 11.

Test #30:

score: 0
Accepted
time: 1ms
memory: 4020kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
! 4

result:

ok Queries used; 14.

Test #31:

score: 0
Accepted
time: 1ms
memory: 4012kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 17.

Test #32:

score: 0
Accepted
time: 1ms
memory: 3828kb

input:

1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 20.

Test #33:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 23.

Test #34:

score: 0
Accepted
time: 1ms
memory: 3924kb

input:

1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 26.

Test #35:

score: 0
Accepted
time: 1ms
memory: 3928kb

input:

1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
! 9

result:

ok Queries used; 29.

Test #36:

score: 0
Accepted
time: 1ms
memory: 4020kb

input:

1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
! 10

result:

ok Queries used; 32.

Test #37:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 299.

Test #38:

score: 0
Accepted
time: 6ms
memory: 3892kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 1382.

Test #39:

score: 0
Accepted
time: 5ms
memory: 3964kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 2587.

Test #40:

score: 0
Accepted
time: 6ms
memory: 3848kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 4327.

Test #41:

score: 0
Accepted
time: 10ms
memory: 3964kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 4718.

Test #42:

score: 0
Accepted
time: 3ms
memory: 3892kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 5620.

Test #43:

score: 0
Accepted
time: 9ms
memory: 4048kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 5627.

Test #44:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
! 3

result:

ok Queries used; 18.

Test #45:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
! 4

result:

ok Queries used; 25.

Test #46:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 32.

Test #47:

score: 0
Accepted
time: 0ms
memory: 3940kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 39.

Test #48:

score: 0
Accepted
time: 1ms
memory: 3944kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
...

result:

ok Queries used; 46.

Test #49:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? lef...

result:

ok Queries used; 53.

Test #50:

score: 0
Accepted
time: 0ms
memory: 4012kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 60.

Test #51:

score: 0
Accepted
time: 1ms
memory: 3896kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? righ...

result:

ok Queries used; 67.

Test #52:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 725.

Test #53:

score: 0
Accepted
time: 4ms
memory: 3960kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 958.

Test #54:

score: 0
Accepted
time: 0ms
memory: 4004kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 1505.

Test #55:

score: 0
Accepted
time: 4ms
memory: 3996kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3174.

Test #56:

score: 0
Accepted
time: 0ms
memory: 4040kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4709.

Test #57:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5612.

Test #58:

score: 0
Accepted
time: 3ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 5613.

Test #59:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
1

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
! 3

result:

ok Queries used; 17.

Test #60:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
1

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
! 4

result:

ok Queries used; 24.

Test #61:

score: 0
Accepted
time: 1ms
memory: 4016kb

input:

0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1

output:

? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 29.

Test #62:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 39.

Test #63:

score: 0
Accepted
time: 1ms
memory: 3932kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
?...

result:

ok Queries used; 47.

Test #64:

score: 0
Accepted
time: 0ms
memory: 3932kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? lef...

result:

ok Queries used; 49.

Test #65:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ...

result:

ok Queries used; 58.

Test #66:

score: 0
Accepted
time: 0ms
memory: 3936kb

input:

1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? ri...

result:

ok Queries used; 739.

Test #67:

score: 0
Accepted
time: 6ms
memory: 3836kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
1
1
0
1
1
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? le...

result:

ok Queries used; 1003.

Test #68:

score: 0
Accepted
time: 7ms
memory: 3876kb

input:

0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? ri...

result:

ok Queries used; 1173.

Test #69:

score: 0
Accepted
time: 8ms
memory: 3952kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? fl...

result:

ok Queries used; 1350.

Test #70:

score: 0
Accepted
time: 1ms
memory: 3952kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left...

result:

ok Queries used; 1679.

Test #71:

score: 0
Accepted
time: 7ms
memory: 3940kb

input:

0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? lef...

result:

ok Queries used; 1954.

Test #72:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? righ...

result:

ok Queries used; 2265.

Test #73:

score: 0
Accepted
time: 10ms
memory: 3876kb

input:

0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 2574.

Test #74:

score: 0
Accepted
time: 7ms
memory: 3952kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? ri...

result:

ok Queries used; 2868.

Test #75:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
...

output:

? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? ri...

result:

ok Queries used; 3106.

Test #76:

score: 0
Accepted
time: 10ms
memory: 3880kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? righ...

result:

ok Queries used; 3348.

Test #77:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
...

output:

? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? r...

result:

ok Queries used; 3704.

Test #78:

score: 0
Accepted
time: 0ms
memory: 3948kb

input:

1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? ri...

result:

ok Queries used; 3831.

Test #79:

score: 0
Accepted
time: 9ms
memory: 3960kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? lef...

result:

ok Queries used; 4096.

Test #80:

score: 0
Accepted
time: 5ms
memory: 3888kb

input:

1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? rig...

result:

ok Queries used; 4371.

Test #81:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? le...

result:

ok Queries used; 4578.

Test #82:

score: 0
Accepted
time: 3ms
memory: 3904kb

input:

1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right...

result:

ok Queries used; 4806.

Test #83:

score: 0
Accepted
time: 3ms
memory: 3968kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? le...

result:

ok Queries used; 5085.

Test #84:

score: 0
Accepted
time: 5ms
memory: 3888kb

input:

0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? ri...

result:

ok Queries used; 5284.

Test #85:

score: 0
Accepted
time: 0ms
memory: 4052kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip...

result:

ok Queries used; 5447.

Test #86:

score: 0
Accepted
time: 22ms
memory: 3976kb

input:

1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip...

result:

ok Queries used; 5616.

Test #87:

score: 0
Accepted
time: 14ms
memory: 3972kb

input:

1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 5625.

Test #88:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
1

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
! 3

result:

ok Queries used; 18.

Test #89:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
1

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
! 4

result:

ok Queries used; 21.

Test #90:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 25.

Test #91:

score: 0
Accepted
time: 1ms
memory: 3928kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 37.

Test #92:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? ri...

result:

ok Queries used; 42.

Test #93:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? fli...

result:

ok Queries used; 48.

Test #94:

score: 0
Accepted
time: 2ms
memory: 3940kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 225.

Test #95:

score: 0
Accepted
time: 4ms
memory: 3940kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? righ...

result:

ok Queries used; 733.

Test #96:

score: 0
Accepted
time: 5ms
memory: 3928kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right...

result:

ok Queries used; 859.

Test #97:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? lef...

result:

ok Queries used; 1002.

Test #98:

score: 0
Accepted
time: 4ms
memory: 4024kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ...

result:

ok Queries used; 1075.

Test #99:

score: 0
Accepted
time: 0ms
memory: 3944kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? le...

result:

ok Queries used; 1126.

Test #100:

score: 0
Accepted
time: 0ms
memory: 3944kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left...

result:

ok Queries used; 1182.

Test #101:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? le...

result:

ok Queries used; 1401.

Test #102:

score: 0
Accepted
time: 5ms
memory: 3888kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
?...

result:

ok Queries used; 1445.

Test #103:

score: 0
Accepted
time: 2ms
memory: 3876kb

input:

1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 1553.

Test #104:

score: 0
Accepted
time: 3ms
memory: 3876kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ...

result:

ok Queries used; 1707.

Test #105:

score: 0
Accepted
time: 5ms
memory: 3944kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 1752.

Test #106:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
...

result:

ok Queries used; 1883.

Test #107:

score: 0
Accepted
time: 0ms
memory: 3888kb

input:

1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? r...

result:

ok Queries used; 1903.

Test #108:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? ...

result:

ok Queries used; 2060.

Test #109:

score: 0
Accepted
time: 6ms
memory: 3952kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right...

result:

ok Queries used; 2117.

Test #110:

score: 0
Accepted
time: 4ms
memory: 3880kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
...

result:

ok Queries used; 2269.

Test #111:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
?...

result:

ok Queries used; 2334.

Test #112:

score: 0
Accepted
time: 0ms
memory: 3952kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? righ...

result:

ok Queries used; 2471.

Test #113:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
...

result:

ok Queries used; 2599.

Test #114:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ...

result:

ok Queries used; 2738.

Test #115:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 2742.

Test #116:

score: 0
Accepted
time: 8ms
memory: 3972kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? r...

result:

ok Queries used; 2806.

Test #117:

score: 0
Accepted
time: 6ms
memory: 3956kb

input:

0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
...

output:

? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? r...

result:

ok Queries used; 2973.

Test #118:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
?...

result:

ok Queries used; 3113.

Test #119:

score: 0
Accepted
time: 3ms
memory: 3964kb

input:

1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip...

result:

ok Queries used; 3207.

Test #120:

score: 0
Accepted
time: 6ms
memory: 3956kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? ...

result:

ok Queries used; 3294.

Test #121:

score: 0
Accepted
time: 0ms
memory: 3888kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? rig...

result:

ok Queries used; 3444.

Test #122:

score: 0
Accepted
time: 10ms
memory: 3956kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? ri...

result:

ok Queries used; 3504.

Test #123:

score: 0
Accepted
time: 5ms
memory: 3956kb

input:

1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? righ...

result:

ok Queries used; 3498.

Test #124:

score: 0
Accepted
time: 3ms
memory: 4040kb

input:

1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 3661.

Test #125:

score: 0
Accepted
time: 5ms
memory: 3888kb

input:

1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? righ...

result:

ok Queries used; 3767.

Test #126:

score: 0
Accepted
time: 2ms
memory: 3948kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? lef...

result:

ok Queries used; 3909.

Test #127:

score: 0
Accepted
time: 7ms
memory: 3844kb

input:

0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
?...

result:

ok Queries used; 4000.

Test #128:

score: 0
Accepted
time: 5ms
memory: 4044kb

input:

1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right...

result:

ok Queries used; 4109.

Test #129:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? ri...

result:

ok Queries used; 4232.

Test #130:

score: 0
Accepted
time: 8ms
memory: 3960kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? rig...

result:

ok Queries used; 4223.

Test #131:

score: 0
Accepted
time: 2ms
memory: 3944kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right...

result:

ok Queries used; 4378.

Test #132:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 4418.

Test #133:

score: 0
Accepted
time: 4ms
memory: 4044kb

input:

1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
...

result:

ok Queries used; 4602.

Test #134:

score: 0
Accepted
time: 3ms
memory: 3892kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 4646.

Test #135:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? r...

result:

ok Queries used; 4758.

Test #136:

score: 0
Accepted
time: 4ms
memory: 3892kb

input:

1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
...

result:

ok Queries used; 4923.

Test #137:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? righ...

result:

ok Queries used; 4958.

Test #138:

score: 0
Accepted
time: 4ms
memory: 3956kb

input:

1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
...

output:

? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? righ...

result:

ok Queries used; 5066.

Test #139:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
...

output:

? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? l...

result:

ok Queries used; 5209.

Test #140:

score: 0
Accepted
time: 5ms
memory: 3888kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 5241.

Test #141:

score: 0
Accepted
time: 0ms
memory: 3960kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
?...

result:

ok Queries used; 5397.

Test #142:

score: 0
Accepted
time: 9ms
memory: 3856kb

input:

0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? r...

result:

ok Queries used; 5489.

Test #143:

score: 0
Accepted
time: 0ms
memory: 3984kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
?...

result:

ok Queries used; 5609.

Test #144:

score: 0
Accepted
time: 4ms
memory: 3896kb

input:

1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
...

output:

? flip
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? r...

result:

ok Queries used; 5622.

Test #145:

score: 0
Accepted
time: 4ms
memory: 4048kb

input:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
? left
?...

result:

ok Queries used; 5624.

Test #146:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
! 3

result:

ok Queries used; 15.

Test #147:

score: 0
Accepted
time: 1ms
memory: 4020kb

input:

0
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
1

output:

? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
! 4

result:

ok Queries used; 23.

Test #148:

score: 0
Accepted
time: 0ms
memory: 4020kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 33.

Test #149:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? righ...

result:

ok Queries used; 40.

Test #150:

score: 0
Accepted
time: 1ms
memory: 3932kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right...

result:

ok Queries used; 45.

Test #151:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? lef...

result:

ok Queries used; 50.

Test #152:

score: 0
Accepted
time: 1ms
memory: 3936kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? le...

result:

ok Queries used; 55.

Test #153:

score: 0
Accepted
time: 1ms
memory: 3944kb

input:

0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1

output:

? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? l...

result:

ok Queries used; 57.

Test #154:

score: 0
Accepted
time: 2ms
memory: 3824kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? rig...

result:

ok Queries used; 428.

Test #155:

score: 0
Accepted
time: 0ms
memory: 3952kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 789.

Test #156:

score: 0
Accepted
time: 1ms
memory: 3888kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 925.

Test #157:

score: 0
Accepted
time: 0ms
memory: 4028kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 932.

Test #158:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 1057.

Test #159:

score: 0
Accepted
time: 6ms
memory: 3952kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 1208.

Test #160:

score: 0
Accepted
time: 0ms
memory: 3872kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
...

result:

ok Queries used; 1216.

Test #161:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 1402.

Test #162:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 1492.

Test #163:

score: 0
Accepted
time: 9ms
memory: 3872kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 1598.

Test #164:

score: 0
Accepted
time: 3ms
memory: 3988kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip...

result:

ok Queries used; 1677.

Test #165:

score: 0
Accepted
time: 10ms
memory: 3960kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
?...

result:

ok Queries used; 1726.

Test #166:

score: 0
Accepted
time: 3ms
memory: 4032kb

input:

0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 1866.

Test #167:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 1997.

Test #168:

score: 0
Accepted
time: 0ms
memory: 3876kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left...

result:

ok Queries used; 2030.

Test #169:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? righ...

result:

ok Queries used; 2135.

Test #170:

score: 0
Accepted
time: 0ms
memory: 3960kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
...

result:

ok Queries used; 2267.

Test #171:

score: 0
Accepted
time: 14ms
memory: 4044kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
...

result:

ok Queries used; 2371.

Test #172:

score: 0
Accepted
time: 4ms
memory: 3884kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 2413.

Test #173:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? flip
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 2570.

Test #174:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip...

result:

ok Queries used; 2672.

Test #175:

score: 0
Accepted
time: 0ms
memory: 3960kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left...

result:

ok Queries used; 2794.

Test #176:

score: 0
Accepted
time: 0ms
memory: 3976kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? righ...

result:

ok Queries used; 2844.

Test #177:

score: 0
Accepted
time: 18ms
memory: 4036kb

input:

0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip...

result:

ok Queries used; 2969.

Test #178:

score: 0
Accepted
time: 0ms
memory: 3848kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3130.

Test #179:

score: 0
Accepted
time: 4ms
memory: 3976kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3143.

Test #180:

score: 0
Accepted
time: 0ms
memory: 3948kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 3253.

Test #181:

score: 0
Accepted
time: 0ms
memory: 3960kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right...

result:

ok Queries used; 3336.

Test #182:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3492.

Test #183:

score: 0
Accepted
time: 5ms
memory: 4040kb

input:

0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
...

output:

? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left...

result:

ok Queries used; 3571.

Test #184:

score: 0
Accepted
time: 0ms
memory: 4040kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 3636.

Test #185:

score: 0
Accepted
time: 4ms
memory: 3848kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 3831.

Test #186:

score: 0
Accepted
time: 4ms
memory: 3892kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 3869.

Test #187:

score: 0
Accepted
time: 7ms
memory: 3948kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left...

result:

ok Queries used; 4022.

Test #188:

score: 0
Accepted
time: 4ms
memory: 3888kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 4130.

Test #189:

score: 0
Accepted
time: 0ms
memory: 3952kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? left
? flip
? right
? right
? right
? right
? right
? left
? lef...

result:

ok Queries used; 4178.

Test #190:

score: 0
Accepted
time: 4ms
memory: 3948kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right...

result:

ok Queries used; 4249.

Test #191:

score: 0
Accepted
time: 4ms
memory: 4036kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
?...

result:

ok Queries used; 4336.

Test #192:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
...

result:

ok Queries used; 4469.

Test #193:

score: 0
Accepted
time: 6ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 4525.

Test #194:

score: 0
Accepted
time: 14ms
memory: 4048kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? righ...

result:

ok Queries used; 4711.

Test #195:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right...

result:

ok Queries used; 4750.

Test #196:

score: 0
Accepted
time: 7ms
memory: 3984kb

input:

1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 4898.

Test #197:

score: 0
Accepted
time: 0ms
memory: 4044kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left...

result:

ok Queries used; 4975.

Test #198:

score: 0
Accepted
time: 2ms
memory: 3964kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 5105.

Test #199:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
1
0
1
1
...

output:

? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left...

result:

ok Queries used; 5213.

Test #200:

score: 0
Accepted
time: 8ms
memory: 3888kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left...

result:

ok Queries used; 5279.

Test #201:

score: 0
Accepted
time: 3ms
memory: 3972kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 5368.

Test #202:

score: 0
Accepted
time: 9ms
memory: 3984kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? right
? left...

result:

ok Queries used; 5462.

Test #203:

score: 0
Accepted
time: 9ms
memory: 3972kb

input:

1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? flip
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 5550.

Test #204:

score: 0
Accepted
time: 6ms
memory: 3984kb

input:

1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
...

output:

? flip
? right
? right
? right
? left
? left
? left
? flip
? right
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? rig...

result:

ok Queries used; 5622.

Test #205:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
...

output:

? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? right
? left
? left
? flip
? right
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right
? left
? flip
? right
? right...

result:

ok Queries used; 5620.