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:
#include <iostream>
#include <string>
#include <vector>
#include <deque>

struct Int {
  std::vector<char> bits;

  void incr(int ix) {
    int n = int(bits.size());
    while (ix < n && bits[ix] == '1')
      bits[ix++] = '0';
    if (ix < n)
      bits[ix] = '1';
    return;
  }

  void decr(int ix) {
    int n = int(bits.size());
    while (ix < n && bits[ix] == '0')
      bits[ix++] = '1';
    if (ix < n)
      bits[ix] = '0';
    return;
  }  
};

std::ostream& operator << (std::ostream& os, const Int& x) {
  for (auto pos = x.bits.rbegin(); pos != x.bits.rend(); ++pos)
    os << *pos;
  return os;
}

int main() {
  using namespace std;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int n, b;
  cin >> n >> b;

  struct Upper {
    int ix;
    Int potVal;
  };

  Int lowerBound { vector<char>(b, '1') };
  deque<Upper> arr;
  for (int i = 1; i <= n; ++i)
    arr.push_front(Upper { i, lowerBound });

  lowerBound.bits.push_back('1'); // allow detection of unwanted overflow
  int w = b;

  /** Invariants:

   * The maximum value in the Sphinx array has
     been proven to b at least Q = overflowed(lowerBound + 1)

   * An entry (Upper { i, val }) in the deque means that the value
     at position i in Sphinx array has been proven to be at most val.

   * An value i with 1 <= i <= n such that (Upper { i, _ }) never appears
     in the deque corresponds to a position in the Sphinx array which has
     been proven to be at most (lowerBound + 1), and so cannot affect the max

   * For any index i, the upper bound described by arr[i] is less than
     unoverflowed(Q + (1 << (w+i)))

   * The value (2*w + 3*arr.size()) decreases by at least one for every
     query performed. Thus, there are at most (2*b + 3*n) queries.

   * The value (w + 2*arr.size()) decreases by one in every iteration.
     Thus, there are at most b + 2*n iterations.
   */

  while (!arr.empty()) {
    /*
    cerr << "loop:\n"
         << "w = " << w << '\n'
         << "lowerBound = " << lowerBound << '\n'
         << "arr = [";
    for (Upper& u : arr)
      cerr << u.ix << ": " << u.potVal << ", ";
    cerr << "]\n";
    */
    if (w == 0) {
      // arr[0] has lowerBound + 1 <= potVal < 2,
      // so arr[0] is exactly determined and is safely removed (in exchange for increasing w)

      // 2*w + 3*arr.size() decreases by 1 (no queries performed)
      // w + 2*arr.size() decreases by 1
      arr.pop_front();
      ++w;
      continue;
    }
    lowerBound.incr(w);
    auto query = [&]() -> bool {
      if (lowerBound.bits.back() != '0') {
        // overflow, trying to compare with an impossibly large value
        return false;
      }
      lowerBound.bits.pop_back();
      cout << arr.back().ix << ' ' << lowerBound << endl;
      lowerBound.bits.push_back('0');
      string ans;
      cin >> ans;
      return ans[0] == 'y';
    };
    if (query()) {
      // keep the increased lower bound,
      // discard the now-redundant arr[0] upper bound
      ++w;
      arr.pop_front();

      // 2*w + 3*arr.size() decreases by 1 (1 query performed)
      // w + 2*arr.size() decreases by 1
      continue;
    }

    lowerBound.decr(--w);
    if (query()) {
      // keep the somewhat increased lower bound
      arr.push_front(Upper { arr.back().ix, lowerBound });
      arr.front().potVal.incr(w);
      arr.pop_back();

      // 2*w + 3*arr.size() decreases by 2 (2 queries performed)
      // w + 2*arr.size() decreases by 1
      continue;
    }
    arr.push_front(Upper { arr.back().ix, lowerBound });
    lowerBound.decr(w);
    arr.pop_back();
    // 2*w + 3*arr.size() decreases by 2 (2 queries performed)
    // w + 2*arr.size() decreases by 1
  }

  lowerBound.bits.pop_back();
  lowerBound.incr(0);
  cout << "0 " << lowerBound << endl;

  return 0;
}