#include "binstring.h" 
#ifndef EVAL 
#include "Lgrader.cpp" 
#endif // EVAL 
#include <random>
using namespace std;
  
mt19937 rg(879123654); 
 
void play(int n)
{
    string s(n, '0'), t(n, '0'); 
    while (true) 
    { 
        for (int i = 0; i < n; ++ i) 
        { 
            s[i] = '0' + rg() % 2; 
        } 
        if (compare_string(s) == 1) break; 
    } 
  
    t = s; 
    s[0] = (s[0] - '0' + 1) % 2 + '0'; 
    for (int i = 1; i < n; ++ i) 
    { 
        s[i] = (s[i] - '0' + 1) % 2 + '0'; 
        if (compare_string(s) == 1) t[i] = (t[i] - '0' + 1) % 2 + '0'; 
        s[i] = (s[i] - '0' + 1) % 2 + '0'; 
    } 
  
    if (compare_string(t) == 2) submit_string(t); 
    else
    { 
        for (int i = 0; i < n; ++ i) 
        { 
            t[i] = (t[i] - '0' + 1) % 2 + '0'; 
        } 
        submit_string(t); 
    }
}