QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#106287#5156. Going in CirclesjoesmittyAC ✓44ms3540kbC++143.6kb2023-05-17 09:01:202023-05-17 09:01:21

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-17 09:01:21]
  • 评测
  • 测评结果:AC
  • 用时:44ms
  • 内存:3540kb
  • [2023-05-17 09:01:20]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef vector<int> vi;
typedef vector< vector <int> > vvi;
typedef pair<int, int> pii;
typedef pair < pair < int, int >, int > piii;
typedef pair < pair <int, int > , pair <int, int> > piiii;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
 
#define FOR(i,a,b) for(int i = a; i < b; i ++)
#define RFOR(i,a,b) for(int i = a-1; i >= b; i --)
#define all(a) a.begin(), a.end()
//#define endl '\n';
#define sz(x) (int)(x).size()
 
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
 
template <typename T>
void pr(vector<T> &v) {
    FOR(i, 0, sz(v)) cout << v[i] << " ";
    cout << endl;
}
template <typename T>
void pr(vector<vector<T> > &v) {
    FOR(i, 0, sz(v)) { pr(v[i]); }
}
template <typename T>
void re(T &x) {
    cin >> x;
}
template <typename T>
void re(vector<T> &a) {
    FOR(i, 0, sz(a)) re(a[i]);
}
template <class Arg, class... Args>
void re(Arg &first, Args &... rest) {
    re(first);
    re(rest...);
}
template <typename T>
void pr(T x) {
    cout << x << endl;
}
template <class Arg, class... Args>
void pr(const Arg &first, const Args &... rest) {
    cout << first << " ";
    pr(rest...);
    cout << endl;
}
void ps() { cout << endl; }
template<class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
    cout << t; if (sizeof...(ts)) cout << " "; ps(ts...);
}
 
const ll MOD  =  998244353;
#define inf 1e18;
#define INF INT_MAX;
 
long double PI = 4*atan(1);
long double eps = 1e-12;


int init;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

bool test(int n) {
    int check = 0;
    int t = 0;
    FOR(i,0,n) {
        cout << "? right" << endl;
        cin >> t;
    }
    cout << "? flip" << endl;
    cin >> check;
    FOR(i,0,n) {
        cout << "? left" << endl;
        cin >> t;
    }
    if(t != init) {
        init = t;
        return true;
    }
    init = t;
    return false;
} 

int main() {
    //auto start = chrono::high_resolution_clock::now();
    ios_base::sync_with_stdio(0);cin.tie(0);
    // freopen("promote.in", "r", stdin);
	// freopen("promote.out", "w", stdout);
    #ifdef DEBUG
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
    #endif 

    cin >> init;

    FOR(i,3,23) {
        if(test(i)) {
            cout << "! " << i << endl;
            return 0;
        }
    }

    vector<int> pat;

    int t = init;
    FOR(i,0,23) {
        int tog = uniform_int_distribution<ll>(0, 1)(rng);
      //  cout << "T: " << tog << endl;
        if(tog) {
            cout << "? flip" << endl;
            cin >> t;
            pat.pb(t);
        } else {
            pat.pb(t);
        }
        cout << "? right" << endl;
        cin >> t;
    }

    vector<int> x;
    x.pb(t);
    
    FOR(i,0,6000) {
        int N = x.size();
        if(N >= 23) {
            bool good = true;
            FOR(j,0, 23) {
                if(x[N - 23 + j] != pat[j]) good = false;
            }   
            if(good) {
                cout << "! " << N << endl;
                return 0;
            }
        }
        cout << "? right" << endl;
        cin >> t;
        x.pb(t);
    }


    // auto stop = chrono::high_resolution_clock::now();
    // auto duration = chrono::duration_cast<chrono::microseconds>(stop - start);
    // cout << duration.count() << endl;
    //cin.close();
    //cout.close();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 27ms
memory: 3452kb

input:

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

output:

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

result:

ok Queries used; 5555.

Test #2:

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

input:

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

output:

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

result:

ok Queries used; 5407.

Test #3:

score: 0
Accepted
time: 28ms
memory: 3480kb

input:

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

output:

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

result:

ok Queries used; 5552.

Test #4:

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

input:

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

output:

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

result:

ok Queries used; 4649.

Test #5:

score: 0
Accepted
time: 43ms
memory: 3516kb

input:

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

output:

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

result:

ok Queries used; 4651.

Test #6:

score: 0
Accepted
time: 35ms
memory: 3472kb

input:

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

output:

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

result:

ok Queries used; 4655.

Test #7:

score: 0
Accepted
time: 37ms
memory: 3464kb

input:

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

output:

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

result:

ok Queries used; 5554.

Test #8:

score: 0
Accepted
time: 21ms
memory: 3412kb

input:

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

output:

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

result:

ok Queries used; 5404.

Test #9:

score: 0
Accepted
time: 17ms
memory: 3484kb

input:

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

output:

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

result:

ok Queries used; 5552.

Test #10:

score: 0
Accepted
time: 23ms
memory: 3444kb

input:

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

output:

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

result:

ok Queries used; 4646.

Test #11:

score: 0
Accepted
time: 26ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 4654.

Test #12:

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

input:

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

output:

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

result:

ok Queries used; 4653.

Test #13:

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

input:

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

output:

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

result:

ok Queries used; 600.

Test #14:

score: 0
Accepted
time: 20ms
memory: 3388kb

input:

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

output:

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

result:

ok Queries used; 2245.

Test #15:

score: 0
Accepted
time: 25ms
memory: 3416kb

input:

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

output:

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

result:

ok Queries used; 3761.

Test #16:

score: 0
Accepted
time: 16ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 5451.

Test #17:

score: 0
Accepted
time: 27ms
memory: 3484kb

input:

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

output:

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

result:

ok Queries used; 5376.

Test #18:

score: 0
Accepted
time: 13ms
memory: 3540kb

input:

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

output:

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

result:

ok Queries used; 5370.

Test #19:

score: 0
Accepted
time: 27ms
memory: 3368kb

input:

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

output:

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

result:

ok Queries used; 5379.

Test #20:

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

input:

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

output:

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

result:

ok Queries used; 5476.

Test #21:

score: 0
Accepted
time: 13ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 5547.

Test #22:

score: 0
Accepted
time: 39ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 5078.

Test #23:

score: 0
Accepted
time: 35ms
memory: 3404kb

input:

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

output:

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

result:

ok Queries used; 5279.

Test #24:

score: 0
Accepted
time: 16ms
memory: 3396kb

input:

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

output:

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

result:

ok Queries used; 5429.

Test #25:

score: 0
Accepted
time: 25ms
memory: 3372kb

input:

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

output:

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

result:

ok Queries used; 4995.

Test #26:

score: 0
Accepted
time: 20ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 5443.

Test #27:

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

input:

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

output:

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

result:

ok Queries used; 5472.

Test #28:

score: 0
Accepted
time: 24ms
memory: 3464kb

input:

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

output:

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

result:

ok Queries used; 4544.

Test #29:

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

input:

1
1
1
1
0
1
1
0

output:

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

result:

ok Queries used; 7.

Test #30:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #31:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #32:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #33:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #34:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #35:

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

input:

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

output:

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

result:

ok Queries used; 91.

Test #36:

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

input:

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

output:

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

result:

ok Queries used; 112.

Test #37:

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

input:

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

output:

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

result:

ok Queries used; 653.

Test #38:

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

input:

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

output:

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

result:

ok Queries used; 1316.

Test #39:

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

input:

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

output:

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

result:

ok Queries used; 2518.

Test #40:

score: 0
Accepted
time: 13ms
memory: 3444kb

input:

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

output:

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

result:

ok Queries used; 4256.

Test #41:

score: 0
Accepted
time: 42ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 4654.

Test #42:

score: 0
Accepted
time: 31ms
memory: 3392kb

input:

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

output:

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

result:

ok Queries used; 5554.

Test #43:

score: 0
Accepted
time: 21ms
memory: 3392kb

input:

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

output:

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

result:

ok Queries used; 5554.

Test #44:

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

input:

0
0
0
0
1
0
0
1

output:

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

result:

ok Queries used; 7.

Test #45:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #46:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #47:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #48:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #49:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #50:

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

input:

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

output:

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

result:

ok Queries used; 91.

Test #51:

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

input:

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

output:

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

result:

ok Queries used; 112.

Test #52:

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

input:

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

output:

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

result:

ok Queries used; 650.

Test #53:

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

input:

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

output:

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

result:

ok Queries used; 905.

Test #54:

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

input:

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

output:

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

result:

ok Queries used; 1440.

Test #55:

score: 0
Accepted
time: 19ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 3112.

Test #56:

score: 0
Accepted
time: 24ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 4645.

Test #57:

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

input:

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

output:

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

result:

ok Queries used; 5551.

Test #58:

score: 0
Accepted
time: 42ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 5555.

Test #59:

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

input:

0
1
0
0
1
0
1
1

output:

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

result:

ok Queries used; 7.

Test #60:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #61:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #62:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #63:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #64:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #65:

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

input:

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
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
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
0

output:

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

result:

ok Queries used; 91.

Test #66:

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

input:

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

output:

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

result:

ok Queries used; 680.

Test #67:

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

input:

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

output:

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

result:

ok Queries used; 936.

Test #68:

score: 0
Accepted
time: 17ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 1095.

Test #69:

score: 0
Accepted
time: 17ms
memory: 3420kb

input:

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

output:

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

result:

ok Queries used; 1283.

Test #70:

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

input:

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

output:

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

result:

ok Queries used; 1610.

Test #71:

score: 0
Accepted
time: 33ms
memory: 3356kb

input:

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

output:

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

result:

ok Queries used; 1887.

Test #72:

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

input:

1
1
0
0
1
0
1
1
1
0
1
0
1
1
0
1
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
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
1
0
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
0
0
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
0
1
0
1
1
...

output:

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

result:

ok Queries used; 2203.

Test #73:

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

input:

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

output:

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

result:

ok Queries used; 2509.

Test #74:

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

input:

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

output:

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

result:

ok Queries used; 2803.

Test #75:

score: 0
Accepted
time: 16ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 3047.

Test #76:

score: 0
Accepted
time: 24ms
memory: 3512kb

input:

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

output:

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

result:

ok Queries used; 3281.

Test #77:

score: 0
Accepted
time: 27ms
memory: 3376kb

input:

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

output:

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

result:

ok Queries used; 3641.

Test #78:

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

input:

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

output:

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

result:

ok Queries used; 3765.

Test #79:

score: 0
Accepted
time: 34ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 4035.

Test #80:

score: 0
Accepted
time: 34ms
memory: 3400kb

input:

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

output:

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

result:

ok Queries used; 4296.

Test #81:

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

input:

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

output:

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

result:

ok Queries used; 4515.

Test #82:

score: 0
Accepted
time: 34ms
memory: 3492kb

input:

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

output:

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

result:

ok Queries used; 4734.

Test #83:

score: 0
Accepted
time: 39ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 5019.

Test #84:

score: 0
Accepted
time: 16ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 5219.

Test #85:

score: 0
Accepted
time: 25ms
memory: 3480kb

input:

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

output:

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

result:

ok Queries used; 5384.

Test #86:

score: 0
Accepted
time: 20ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 5551.

Test #87:

score: 0
Accepted
time: 26ms
memory: 3484kb

input:

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

output:

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

result:

ok Queries used; 5557.

Test #88:

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

input:

1
1
0
1
0
0
1
0

output:

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

result:

ok Queries used; 7.

Test #89:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #90:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #91:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #92:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #93:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #94:

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

input:

1
1
1
0
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
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
0
0
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
0
0
0
0
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
0
1
...

output:

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

result:

ok Queries used; 590.

Test #95:

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

input:

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

output:

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

result:

ok Queries used; 671.

Test #96:

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

input:

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

output:

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

result:

ok Queries used; 795.

Test #97:

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

input:

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

output:

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

result:

ok Queries used; 939.

Test #98:

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

input:

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

output:

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

result:

ok Queries used; 1011.

Test #99:

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

input:

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

output:

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

result:

ok Queries used; 1062.

Test #100:

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

input:

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

output:

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

result:

ok Queries used; 1125.

Test #101:

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

input:

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

output:

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

result:

ok Queries used; 1344.

Test #102:

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

input:

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

output:

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

result:

ok Queries used; 1379.

Test #103:

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

input:

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

output:

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

result:

ok Queries used; 1490.

Test #104:

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

input:

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

output:

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

result:

ok Queries used; 1640.

Test #105:

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

input:

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

output:

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

result:

ok Queries used; 1689.

Test #106:

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

input:

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

output:

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

result:

ok Queries used; 1815.

Test #107:

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

input:

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

output:

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

result:

ok Queries used; 1845.

Test #108:

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

input:

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

output:

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

result:

ok Queries used; 1992.

Test #109:

score: 0
Accepted
time: 29ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 2049.

Test #110:

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

input:

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

output:

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

result:

ok Queries used; 2204.

Test #111:

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

input:

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

output:

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

result:

ok Queries used; 2275.

Test #112:

score: 0
Accepted
time: 17ms
memory: 3448kb

input:

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

output:

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

result:

ok Queries used; 2407.

Test #113:

score: 0
Accepted
time: 17ms
memory: 3404kb

input:

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

output:

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

result:

ok Queries used; 2525.

Test #114:

score: 0
Accepted
time: 23ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 2666.

Test #115:

score: 0
Accepted
time: 42ms
memory: 3404kb

input:

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

output:

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

result:

ok Queries used; 2671.

Test #116:

score: 0
Accepted
time: 29ms
memory: 3408kb

input:

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

output:

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

result:

ok Queries used; 2738.

Test #117:

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

input:

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

output:

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

result:

ok Queries used; 2905.

Test #118:

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

input:

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

output:

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

result:

ok Queries used; 3043.

Test #119:

score: 0
Accepted
time: 15ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 3147.

Test #120:

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

input:

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

output:

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

result:

ok Queries used; 3220.

Test #121:

score: 0
Accepted
time: 17ms
memory: 3512kb

input:

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

output:

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

result:

ok Queries used; 3380.

Test #122:

score: 0
Accepted
time: 34ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 3438.

Test #123:

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

input:

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

output:

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

result:

ok Queries used; 3438.

Test #124:

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

input:

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

output:

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

result:

ok Queries used; 3593.

Test #125:

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

input:

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

output:

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

result:

ok Queries used; 3699.

Test #126:

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

input:

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

output:

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

result:

ok Queries used; 3846.

Test #127:

score: 0
Accepted
time: 30ms
memory: 3388kb

input:

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

output:

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

result:

ok Queries used; 3937.

Test #128:

score: 0
Accepted
time: 29ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 4045.

Test #129:

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

input:

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

output:

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

result:

ok Queries used; 4164.

Test #130:

score: 0
Accepted
time: 24ms
memory: 3444kb

input:

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

output:

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

result:

ok Queries used; 4161.

Test #131:

score: 0
Accepted
time: 32ms
memory: 3400kb

input:

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

output:

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

result:

ok Queries used; 4319.

Test #132:

score: 0
Accepted
time: 19ms
memory: 3444kb

input:

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

output:

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

result:

ok Queries used; 4356.

Test #133:

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

input:

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

output:

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

result:

ok Queries used; 4543.

Test #134:

score: 0
Accepted
time: 30ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 4590.

Test #135:

score: 0
Accepted
time: 44ms
memory: 3392kb

input:

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

output:

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

result:

ok Queries used; 4699.

Test #136:

score: 0
Accepted
time: 16ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 4856.

Test #137:

score: 0
Accepted
time: 34ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 4893.

Test #138:

score: 0
Accepted
time: 13ms
memory: 3480kb

input:

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

output:

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

result:

ok Queries used; 5000.

Test #139:

score: 0
Accepted
time: 27ms
memory: 3388kb

input:

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

output:

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

result:

ok Queries used; 5143.

Test #140:

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

input:

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

output:

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

result:

ok Queries used; 5171.

Test #141:

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

input:

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

output:

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

result:

ok Queries used; 5327.

Test #142:

score: 0
Accepted
time: 19ms
memory: 3396kb

input:

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

output:

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

result:

ok Queries used; 5411.

Test #143:

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

input:

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

output:

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

result:

ok Queries used; 5533.

Test #144:

score: 0
Accepted
time: 17ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 5553.

Test #145:

score: 0
Accepted
time: 39ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 5554.

Test #146:

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

input:

1
0
1
1
0
1
0
0

output:

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

result:

ok Queries used; 7.

Test #147:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #148:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #149:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #150:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #151:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #152:

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

input:

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

output:

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

result:

ok Queries used; 91.

Test #153:

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

input:

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

output:

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

result:

ok Queries used; 112.

Test #154:

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

input:

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

output:

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

result:

ok Queries used; 615.

Test #155:

score: 0
Accepted
time: 13ms
memory: 3428kb

input:

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

output:

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

result:

ok Queries used; 714.

Test #156:

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

input:

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

output:

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

result:

ok Queries used; 856.

Test #157:

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

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
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
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

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

result:

ok Queries used; 872.

Test #158:

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

input:

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

output:

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

result:

ok Queries used; 995.

Test #159:

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

input:

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

output:

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

result:

ok Queries used; 1146.

Test #160:

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

input:

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

output:

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

result:

ok Queries used; 1149.

Test #161:

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

input:

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

output:

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

result:

ok Queries used; 1339.

Test #162:

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

input:

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

output:

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

result:

ok Queries used; 1431.

Test #163:

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

input:

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

output:

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

result:

ok Queries used; 1535.

Test #164:

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

input:

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

output:

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

result:

ok Queries used; 1617.

Test #165:

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

input:

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

output:

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

result:

ok Queries used; 1664.

Test #166:

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

input:

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

output:

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

result:

ok Queries used; 1806.

Test #167:

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

input:

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

output:

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

result:

ok Queries used; 1932.

Test #168:

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

input:

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

output:

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

result:

ok Queries used; 1965.

Test #169:

score: 0
Accepted
time: 13ms
memory: 3356kb

input:

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

output:

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

result:

ok Queries used; 2076.

Test #170:

score: 0
Accepted
time: 31ms
memory: 3416kb

input:

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

output:

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

result:

ok Queries used; 2199.

Test #171:

score: 0
Accepted
time: 17ms
memory: 3336kb

input:

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

output:

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

result:

ok Queries used; 2306.

Test #172:

score: 0
Accepted
time: 20ms
memory: 3392kb

input:

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

output:

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

result:

ok Queries used; 2348.

Test #173:

score: 0
Accepted
time: 21ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 2497.

Test #174:

score: 0
Accepted
time: 15ms
memory: 3444kb

input:

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

output:

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

result:

ok Queries used; 2609.

Test #175:

score: 0
Accepted
time: 16ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 2724.

Test #176:

score: 0
Accepted
time: 17ms
memory: 3348kb

input:

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

output:

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

result:

ok Queries used; 2771.

Test #177:

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

input:

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

output:

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

result:

ok Queries used; 2903.

Test #178:

score: 0
Accepted
time: 19ms
memory: 3440kb

input:

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

output:

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

result:

ok Queries used; 3064.

Test #179:

score: 0
Accepted
time: 26ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 3074.

Test #180:

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

input:

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

output:

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

result:

ok Queries used; 3178.

Test #181:

score: 0
Accepted
time: 21ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 3272.

Test #182:

score: 0
Accepted
time: 15ms
memory: 3400kb

input:

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

output:

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

result:

ok Queries used; 3428.

Test #183:

score: 0
Accepted
time: 19ms
memory: 3448kb

input:

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

output:

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

result:

ok Queries used; 3508.

Test #184:

score: 0
Accepted
time: 21ms
memory: 3400kb

input:

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
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
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
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
1
0
1
1
...

output:

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

result:

ok Queries used; 3569.

Test #185:

score: 0
Accepted
time: 44ms
memory: 3404kb

input:

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

output:

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

result:

ok Queries used; 3764.

Test #186:

score: 0
Accepted
time: 21ms
memory: 3388kb

input:

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

output:

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

result:

ok Queries used; 3805.

Test #187:

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

input:

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

output:

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

result:

ok Queries used; 3959.

Test #188:

score: 0
Accepted
time: 17ms
memory: 3348kb

input:

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

output:

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

result:

ok Queries used; 4063.

Test #189:

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

input:

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

output:

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

result:

ok Queries used; 4104.

Test #190:

score: 0
Accepted
time: 21ms
memory: 3412kb

input:

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

output:

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

result:

ok Queries used; 4171.

Test #191:

score: 0
Accepted
time: 27ms
memory: 3384kb

input:

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

output:

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

result:

ok Queries used; 4270.

Test #192:

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

input:

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

output:

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

result:

ok Queries used; 4400.

Test #193:

score: 0
Accepted
time: 15ms
memory: 3404kb

input:

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

output:

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

result:

ok Queries used; 4458.

Test #194:

score: 0
Accepted
time: 38ms
memory: 3372kb

input:

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

output:

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

result:

ok Queries used; 4645.

Test #195:

score: 0
Accepted
time: 42ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 4681.

Test #196:

score: 0
Accepted
time: 38ms
memory: 3428kb

input:

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

output:

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

result:

ok Queries used; 4835.

Test #197:

score: 0
Accepted
time: 28ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 4903.

Test #198:

score: 0
Accepted
time: 25ms
memory: 3376kb

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
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
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
...

output:

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

result:

ok Queries used; 5040.

Test #199:

score: 0
Accepted
time: 16ms
memory: 3476kb

input:

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

output:

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

result:

ok Queries used; 5142.

Test #200:

score: 0
Accepted
time: 32ms
memory: 3408kb

input:

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

output:

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

result:

ok Queries used; 5208.

Test #201:

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

input:

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

output:

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

result:

ok Queries used; 5295.

Test #202:

score: 0
Accepted
time: 16ms
memory: 3396kb

input:

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

output:

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

result:

ok Queries used; 5399.

Test #203:

score: 0
Accepted
time: 29ms
memory: 3468kb

input:

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

output:

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

result:

ok Queries used; 5481.

Test #204:

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

input:

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
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
0
1
0
1
1
...

output:

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

result:

ok Queries used; 5550.

Test #205:

score: 0
Accepted
time: 16ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 5553.