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 JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class IOK {
    FastScanner in;
    PrintWriter out;

    String toString(BigInteger x, int maxBits) {
        char[] res = new char[maxBits];
        String ok = x.toString(2);
        Arrays.fill(res, '0');
        int moreZeros = (res.length - ok.length());
        if (moreZeros < 0) {
            throw new AssertionError();
        }
        for (int i = 0; i < ok.length(); i++) {
            res[i + moreZeros] = ok.charAt(i);
        }
        return new String(res);
    }

    void solve() {
        int n = in.nextInt();
        int maxBits = in.nextInt();
        BigInteger upperBound = BigInteger.ONE.shiftLeft(maxBits);
        Number[] numbers = new Number[n];
        for (int i = 0; i < numbers.length; i++) {
            numbers[i] = new Number(i, upperBound);
        }
        BigInteger lowerBound = BigInteger.ZERO;
        int numQueries = 0;
        while (true) {
            Arrays.sort(numbers);
            numbers = updateNumbers(numbers, lowerBound);
            if (numbers.length == 0) {
                break;
            }
            Number toAsk = numbers[numbers.length - 1];
            if (toAsk.upperBound.compareTo(lowerBound) == 0) {
                break;
            }
            numQueries++;
            Number first = numbers[0];
            BigInteger dist = first.upperBound.subtract(lowerBound).add(BigInteger.ONE);
            if (dist.compareTo(BigInteger.ONE) <= 0) {
                throw new AssertionError();
            }
            dist = dist.shiftRight(1);
            BigInteger y = lowerBound.add(dist).subtract(BigInteger.ONE);
            if (isBigger(toAsk.id, y, maxBits)) {
                lowerBound = y.add(BigInteger.ONE);

                if (upperBound.compareTo(first.upperBound) != 0) {
                    y = first.upperBound;
                    if (isBigger(toAsk.id, y, maxBits)) {
                        lowerBound = y.add(BigInteger.ONE);
                    } else {
                        toAsk.upperBound = y;
                    }
                }
            } else {
                toAsk.upperBound = y;
            }
        }
//        System.err.println("num queries = " + numQueries);
        answerIs(lowerBound, maxBits);
    }

    void answerIs(BigInteger res, int maxBits) {
        out.println("0 " + toString(res, maxBits));
        out.flush();
    }

    Number[] updateNumbers(Number[] numbers, BigInteger lowerBound) {
        int first = 0;
        while (first != numbers.length && numbers[first].upperBound.compareTo(lowerBound) <= 0) {
            first++;
        }
        Number[] res = new Number[numbers.length - first];
        for (int i = 0; i < res.length; i++) {
            res[i] = numbers[i + first];
        }
        return res;
    }

    boolean isBigger(int id, BigInteger y, int maxBits) {
        out.println((id + 1) + " " + toString(y, maxBits));
        out.flush();
        return in.next().equals("yes");
    }

    class Number implements Comparable<Number> {
        int id;
        BigInteger upperBound;

        public Number(int id, BigInteger upperBound) {
            this.id = id;
            this.upperBound = upperBound;
        }

        @Override
        public int compareTo(Number o) {
            return upperBound.compareTo(o.upperBound);
        }
    }

    void run() {
        try {
            in = new FastScanner(new File("I.in"));
            out = new PrintWriter(new File("I.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    public static void main(String[] args) {
        new IOK().runIO();
    }
}