#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
struct Point {double x,y;};
inline Point operator+ (const Point &a,const Point &b) {return {a.x + b.x,a.y + b.y};}
inline Point operator- (const Point &a,const Point &b) {return {a.x - b.x,a.y - b.y};}
inline Point operator* (const Point &a,double b) {return {a.x * b,a.y * b};}
inline Point operator/ (const Point &a,double b) {return {a.x / b,a.y / b};}
inline double cross(const Point &a,const Point &b) {return a.x * b.y - a.y * b.x;}
inline double dot(const Point &a,const Point &b) {return a.x * b.x + a.y * b.y;}
inline double dis(const Point &a) {return sqrt(dot(a,a));}
inline double angle(const Point &a,const Point &b) 
{return acos(dot(a,b) / dis(a) / dis(b));}
inline double polar(const Point &a) {return atan2(a.y,a.x);}
inline double slope(const Point &a,const Point &b) {return (b.y - a.y) / (b.x - a.x);}
const int P = 998244353,INV2 = (P + 1) / 2;
using ll = long long;
void FWT_xor(ll a[],int n,int fl)
{
    for (int l = 1;l < n;l *= 2)
        for (int s = 0;s < n;s += l * 2)
            for (int k = s;k < s + l;k++)
            {
                ll tmp = a[k + l];
                a[k + l] = (a[k] + P - tmp) % P * (fl == 1 ? 1 : INV2) % P;
                a[k] = (a[k] + tmp) % P * (fl == 1 ? 1 : INV2) % P;
            }
}
int n,kk,b;
int main ()
{
    ios::sync_with_stdio(false);
    cin >> n >> kk;deque<int> d;string ans(n + kk,'1'),op;
    for (int i = 1;i <= n;i++) d.push_back(i);
    ans[0] = '0';
    while (b < kk - 1 + d.size())
    {
        cout << d.front() << ' ' << ans.substr(0,kk) << endl;
        cin >> op;
        if (op == "yes")
        {
            while (ans[b] == '1') --b,d.pop_back();
            ans[b] = '1';
        }
        else ans[++b] = '0',d.push_back(d.front()),d.pop_front();
    }
    cout << "0 " << ans.substr(0,kk) << endl;
    return 0;
}