Problem: What walks on four feet in the morning, two in the afternoon, and three at night?

This is an interactive problem. This problem doesn't support hacks.

Sphinx's duty is to guard the city of Thebes by making sure that no unworthy traveler crosses its gates. Only the ones who answer her riddle timely and correctly (or get an acc for short) are allowed to pass. As of those who fail, no one heard of them ever again...

So you don't have a choice but to solve the riddle. Sphinx has an array a_1, a_2, …, a_n of nonnegative integers strictly smaller than 2^b and asked you to find the maximum value among its elements. Of course, she will not show you the array, but she will give you n and b. As it is impossible to answer this riddle blindly, you can ask her some questions. For given i, y, she'll answer you whether a_i is bigger than y. As sphinxes are not very patient, you can ask at most 3 ⋅ (n + b)  such questions.

Although cunning, sphinxes are honest. Even though the array can change between your queries, answers to the previously asked questions will remain valid.

Input

The first line contains two integers n and b (1 ≤ n, b ≤ 200). The remaining parts of the input will be given throughout the interaction process.

Interaction

In each round your program must output a single line with an integer i (0 ≤ i ≤ n) and a binary string of length exactly b denoting the binary representation of y (most significant bit first).

If i > 0, this line encodes the question: Is a_i bigger than y?. There should be at most 3 ⋅ (n+b) such lines; after each of them, the interactor will print yes or no in a single line.

If i = 0, this is the last round of interaction, after which your program should terminate, and y should be the maximal value among the elements of Sphinx's array. Note that this round does not count to the query limit.

Note that the interactor is adaptive.

After printing a query, do not forget to output the end of the line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see the documentation for other languages.



If your solution does not correctly follow the interaction guideline above, it may receive an arbitrary verdict. Otherwise, your program will receive the Wrong Answer judgment if it reports the wrong maximum.

Examples

Input


5 3

yes

no

no

no

no

yes


Output


5 101

5 110

4 100

3 101

2 001

1 000

0 110


Input


4 3

no

no

no

no


Output


1 000

2 000

3 000

4 000

0 000


Input


1 1


Output


0 0

Note

In all examples, the sequence is fixed beforehand.

In the first example, the sequence is 2, 1, 4, 0, 6.

In the second example, the sequence is 0, 0, 0, 0.

In the third example, the sequence is 0.

Note that if the interactor was adaptive, then the interaction in the first and the third example would not be sufficient to return the correct value of maximum.

Solution (in CPP):

Solution:
/***************************************************************
	File name: CF1466I.cpp
	Author: ljfcnyali
	Create time: 2021年01月07日 星期四 21时59分12秒
***************************************************************/
#include<bits/stdc++.h>

using namespace std;

#define REP(i, a, b) for ( int i = (a), _end_ = (b); i <= _end_; ++ i ) 
#define mem(a) memset ( (a), 0, sizeof ( a ) ) 
#define str(a) strlen ( a ) 
#define pii pair<int, int>
typedef long long LL;

const int maxn = 1e5 + 10;

map<vector<int>, bool> Map[210];
int Real[maxn], cnt;

// #define Auto
#ifdef Auto
inline bool print(vector<int> a, int pos)
{
    ++ cnt;
    int x = 0; REP(i, 1, 7) x = x * 2 + a[i - 1];
    // printf("%d ", pos); for ( auto it : a ) printf("%d", it); puts(""); fflush(stdout);
    // if ( x < Real[pos] ) puts("yes"); else puts("no");
    if ( x < Real[pos] ) return 1;
    return 0;
}
#else 
inline bool print(vector<int> a, int pos) 
{
    if ( Map[pos].count(a) ) return Map[pos][a];
    printf("%d ", pos); for ( auto it : a ) printf("%d", it); puts(""); fflush(stdout);
    string s; cin >> s; Map[pos][a] = s == "yes"; return s == "yes";
}
#endif

inline vector<int> Decrease(vector<int> a)
{
    int n = a.size() - 1; while ( a[n] == 0 ) a[n --] = 1;
    a[n] = 0; return a; 
}

inline bool Check1(vector<int> a, int b, int pos)
{
    while ( a.size() < b ) a.push_back(1);
    return print(a, pos);
}

inline bool Check2(vector<int> a, int b, int pos, bool op)
{
    while ( a.size() < b ) a.push_back(0);
    if ( !op ) 
    {
        bool flag = false; for ( auto it : a ) if ( it == 1 ) flag = true; if ( !flag ) return false;
        a = Decrease(a); 
    }
    return !print(a, pos);
}

inline vector<int> Solve(vector<int> pre, vector<int> a, int b)
{
    // cerr << pre.size() << " " << a.size() << " " << b << endl;
    vector<int> Stack, ans, val; if ( pre.size() == b ) return pre;
    // random_shuffle(a.begin(), a.end()); 
    val = pre; int c = pre.size();
    for ( int i = 0; i < a.size(); ++ i ) 
    {
        while ( Stack.size() && Check1(val, b, a[i]) ) { val.pop_back(); Stack.pop_back(); }
        if ( val.size() == b ) continue ; 
        // if ( Check2(val, b, a[i], 0) || val.size() == b ) continue ;  
        Stack.push_back(a[i]); val.push_back(1);
        if ( Check2(val, b, a[i], 0) ) val[val.size() - 1] = 0; 
    }
    /*
    // for ( auto it : val ) cout << it; cout << " "; for ( auto it : Stack ) cout << it << " "; cout << endl;
    vector<int> nxt;
    while ( Stack.size() ) 
    {
        int it = Stack.front(); pre.push_back(val[c]); ++ c;
        if ( Stack.size() == 1 ) break ; 
        // if ( Check2(val, b, it, 1) ) { Stack.erase(Stack.begin()); continue ; }
        if ( !Check1(val, b, it) ) { nxt.push_back(it); Stack.erase(Stack.begin()); continue ; } 
        Stack.pop_back(); val.pop_back(); while ( Check1(val, b, it) ) { Stack.pop_back(); val.pop_back(); }
        for ( auto i : nxt ) Stack.push_back(i);
        return Solve(pre, Stack, b);
    }
    for ( auto i : nxt ) Stack.push_back(i);
    return Solve(pre, Stack, b);
    */
    vector<int> nxt; nxt.push_back(Stack.back()); Stack.pop_back();
    while ( Stack.size() ) 
    {
        int it = Stack.back();
        if ( Check1(val, b, it) ) return Solve(pre, Stack, b); 
        Stack.pop_back(); nxt.push_back(it);
    }
    return Solve(val, nxt, b);
}

int main()
{
#ifdef Auto
    freopen("input.txt", "r", stdin);
#endif
    int n, b; scanf("%d%d", &n, &b);
#ifdef Auto
    REP(i, 1, n)
    {
        getchar(); int x = 0;
        REP(j, 1, b) { char c = getchar(); x = x * 2 + c - '0'; }
        Real[i] = x;
    }
#endif
    vector<int> a, t; REP(i, 1, n) a.push_back(i);
    a = Solve(t, a, b); printf("0 "); for ( auto it : a ) cout << it; cout << endl;
    fflush(stdout);
#ifdef Auto
    cout << cnt << endl;
#endif
    return 0;
}