// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        printf("? ");
        REP(i,n) printf("%d",a[i]);
        puts("");
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m-1); // find 1
        ok|=(ans1==1 && d1-d2<m-1); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l+1;
    else ans0=l+1;
    printf("? %d %d\n", ans0, ans1);
    fflush(stdout);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        _W("? ");
        REP(i,n) _W(a[i]);
        W("");
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m-1); // find 1
        ok|=(ans1==1 && d1-d2<m-1); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l+1;
    else ans0=l+1;
    W('!',ans0,ans1);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        printf("? ");
        REP(i,n) printf("%d",a[i]);
        puts("");
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m); // find 1
        ok|=(ans1==1 && d1-d2<m); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l+1;
    else ans0=l+1;
    printf("! %d %d\n", ans0, ans1);
    fflush(stdout);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        printf("? ");
        REP(i,n) printf("%d",a[i]);
        puts("");
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m-1); // find 1
        ok|=(ans1==1 && d1-d2<m-1); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l;
    else ans0=l;
    printf("! %d %d\n", ans0, ans1);
    fflush(stdout);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        _W("? ");
        REP(i,n) _W(a[i]);
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m-1); // find 1
        ok|=(ans1==1 && d1-d2<m-1); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l+1;
    else ans0=l+1;
    W('!',ans0,ans1);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


// {{{ by unolight
#pragma region
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wunused-function"
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x),end(x)
#define RALL(x) rbegin(x),rend(x)
#define REP(i,n) for ( int i=0; i<int(n); i++ )
#define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ )
#define MP make_pair
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef pair<int,int> PII;
typedef vector<int> VI;

namespace { namespace unolight {
// Read Input
template<class T> void _R( T &x ) { cin>>x; }
void _R( int &x ) { scanf("%d",&x); }
void _R( int64_t &x ) { scanf("%" PRId64,&x); }
void _R( double &x ) { scanf("%lf",&x); }
void _R( char &x ) { scanf(" %c",&x); }
void _R( char *x ) { scanf("%s",x); }
void R() {}
template<class T, class... U> void R( T& head, U&... tail ) { _R(head); R(tail...); }
// Write Output
template<class T> void _W( const T &x ) { cout<<x; }
void _W( const int &x ) { printf("%d",x); }
void _W( const int64_t &x ) { printf("%" PRId64,x); }
void _W( const double &x ) { printf("%.16f\n",x); }
void _W( const char &x ) { putchar(x); }
void _W( const char *x ) { printf("%s",x); }
template<class T> void _W( const vector<T> &x ) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W( const T& head, const U&... tail ) { _W(head); putchar(sizeof...(tail)?' ':'\n'); W(tail...); }

#ifdef UNOLIGHT
#include "dump.hpp"
#else
#define dump(...)
#endif

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}
#pragma endregion
// }}}

// 1. ask 00000,..
// 2. ask 10000,,.
// binary search ask 11111100...find the another bit
void main() {
    int n;
    R(n);
    VI a(n);
    auto Ask=[&]() {
        _W("? ");
        REP(i,n) _W(a[i]);
        W("");
        fflush(stdout);
        int x;
        R(x);
        return x;
    };
    int ans0=0, ans1=0;
    int base=Ask();
    a[0]=1;
    int d1=Ask();
    if ( d1<base ) ans1=1;
    else ans0=1;
    int l=1, r=n-1;
    while ( l<r ) {
        int m=(l+r)>>1;
        REP(i,n) a[i]=(i<m);
        int d2=Ask();
        bool ok=0;
        ok|=(ans0==1 && d2-d1<m-1); // find 1
        ok|=(ans1==1 && d1-d2<m-1); // find 0
        if ( ok ) r=m;
        else l=m+1;
    }
    if ( ans0 ) ans1=l+1;
    else ans0=l+1;
    W('!',ans0,ans1);
    fflush(stdout);
}

 // {{{ main
}}
int main() { unolight::main(); return 0; }
// }}}


#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
#include<bits/stdc++.h>
using namespace std;
#define y1 y11
#define fi first
#define se second
#define pi acos(-1.0)
#define LL long long
#define ls rt<<1, l, m
#define rs rt<<1|1, m+1, r
//#define mp make_pair
#define pb push_back
#define ULL unsigned LL
#define pll pair<LL, LL>
#define pli pair<LL, int>
#define plii pair<LL,pii>
#define pii pair<int, int>
#define piii pair<pii, pii>
#define pdi pair<double, int>
#define pdd pair<double, double>
#define mem(a, b) memset(a, b, sizeof(a))
#define debug(x) cerr << #x << " = " << x << "\n";
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//head

int n, b, a, x = -1, y = -1;
int main() {
    fio;
    cin >> n;
    string s;
    for (int i = 0; i < n; ++i) s.pb('0');
    cout << "? " << s << endl;
    cin >> b;
    int l = 0, r = n-1, m = l+r >> 1;
    while(l < r) {
        string t = s;
        for (int i = l; i <= m; ++i) t[i] = '1';
        cout << "? " << t << endl;
        cin >> a;
        if(x == -1) {
            if(a == b-(m-l+1)) {
                x = m;
                l = m+1;
            }
            else {
                if(a == b+(m-l+1)) l = m+1;
                else r = m;
            }
        }
        else {
            if(a == b+(m-l+1)) {
                y = m;
                break;
            }
            else {
                if(a == b-(m-l+1)) l = m+1;
                else r = m;
            }
        }
        m = l+r >> 1;
    }
    if(y == -1) y = m;
    cout << "! " << y+1 << " " << x+1 << endl;
    return 0;
}


#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
#include<bits/stdc++.h>
using namespace std;
#define y1 y11
#define fi first
#define se second
#define pi acos(-1.0)
#define LL long long
#define ls rt<<1, l, m
#define rs rt<<1|1, m+1, r
//#define mp make_pair
#define pb push_back
#define ULL unsigned LL
#define pll pair<LL, LL>
#define pli pair<LL, int>
#define plii pair<LL,pii>
#define pii pair<int, int>
#define piii pair<pii, pii>
#define pdi pair<double, int>
#define pdd pair<double, double>
#define mem(a, b) memset(a, b, sizeof(a))
#define debug(x) cerr << #x << " = " << x << "\n";
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//head

int n, b, a, x = -1, y = -1;
int main() {
    fio;
    cin >> n;
    string s;
    for (int i = 0; i < n; ++i) s.pb('0');
    cout << "? " << s << endl;
    cin >> b;
    int l = 0, r = n-1, m = l+r >> 1;
    while(l < r) {
        string t = s;
        for (int i = l; i <= m; ++i) t[i] = '1';
        cout << "? " << t << endl;
        cin >> a;
        if(x == -1) {
            if(a == b-(m-l+1)) {
                x = m;
                l = m+1;
            }
            else {
                if(a == b+(m-l+1)) {
                    y = m;
                    l = m+1;
                }
                else r = m;
            }
        }
        else {
            if(a == b+(m-l+1)) {
                y = m;
                break;
            }
            else {
                if(a == b-(m-l+1)) l = m+1;
                else r = m;
            }
        }
        m = l+r >> 1;
    }
    if(x == -1) x = m;
    if(y == -1) y = m;
    cout << "! " << y+1 << " " << x+1 << endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
//#pragma comment(linker, "/STACK:102400000,102400000")
using namespace __gnu_pbds;
#define _for(i,a,b) for(int i=(a);i<(b);++i)
#define ms(a) memset(a,0,sizeof(a))
#define ms_inf(a) memset(a,0x3f,sizeof(a))
#define ms_ninf(a) memset(a,0xcf,sizeof(a))
#define pb push_back
#define mp make_pair
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
//#define lc (o<<1)
//#define rc (o<<1|1)
//#include<ext/pb_ds/priority_queue.hpp>
//typedef __gnu_pbds::priority_queue<no> heap;  //��ƫ��
typedef long long ll;
typedef unsigned long long ull;
ull MOD=212370440130137957ll;
int mod=1e9+7;
ll INF=1e18;
const int maxn=1e3+10;
const int maxl=360;
const double PI=acos(-1.0);
const double eps=1e-8;
int n;int a[2];
char s[maxn];
int ask(int l,int r)
{
	_for(t,1,n+1)s[t]='1';
	_for(t,l,r+1)s[t]='0';
	cout<<"? "<<s+1<<endl;
	int x;cin>>x;return x;
}
int pre;
void dfs(int l,int r)
{
	if(l==r)
	{
		_for(t,0,2)if(!a[t])a[t]=l;
		return;
	}
	int mid=(l+r)>>1;
	int u=ask(l,mid);
	u=pre-u;
	int len=mid-l+1;
	if(u==len)
	{
		a[0]=l;
		dfs(mid+1,r);
	}
	else if(u==-len)
	{
		a[1]=l;
		dfs(mid+1,r);
	}
	else dfs(l,mid);
}
int main()
{
	pre=ask(1,0);
	dfs(1,n);
	cout<<"! ";
	_for(t,0,2)cout<<a[t]<<" ";
	cout.flush();
}


#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
//#pragma comment(linker, "/STACK:102400000,102400000")
using namespace __gnu_pbds;
#define _for(i,a,b) for(int i=(a);i<(b);++i)
#define ms(a) memset(a,0,sizeof(a))
#define ms_inf(a) memset(a,0x3f,sizeof(a))
#define ms_ninf(a) memset(a,0xcf,sizeof(a))
#define pb push_back
#define mp make_pair
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
//#define lc (o<<1)
//#define rc (o<<1|1)
//#include<ext/pb_ds/priority_queue.hpp>
//typedef __gnu_pbds::priority_queue<no> heap;  //��ƫ��
typedef long long ll;
typedef unsigned long long ull;
ull MOD=212370440130137957ll;
int mod=1e9+7;
ll INF=1e18;
const int maxn=1e3+10;
const int maxl=360;
const double PI=acos(-1.0);
const double eps=1e-8;
int n;int a[2];
char s[maxn];
int ask(int l,int r)
{
	_for(t,1,n+1)s[t]='1';
	_for(t,l,r+1)s[t]='0';
	cout<<"? "<<s+1<<endl;cout.flush();
	int x;cin>>x;return x;
}
int pre;
void dfs(int l,int r)
{
	if(l==r)
	{
		_for(t,0,2)if(!a[t])a[t]=l;
		return;
	}
	int mid=(l+r)>>1;
	int u=ask(l,mid);
	u=pre-u;
	int len=mid-l+1;
	if(u==len)
	{
		a[0]=l;
		dfs(mid+1,r);
	}
	else if(u==-len)
	{
		a[1]=l;
		dfs(mid+1,r);
	}
	else dfs(l,mid);
}
int main()
{
	cin>>n;
	pre=ask(1,0);
	dfs(1,n);
	cout<<"! ";
	_for(t,0,2)cout<<a[t]<<" ";
	cout.flush();
}


#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
//#pragma comment(linker, "/STACK:102400000,102400000")
using namespace __gnu_pbds;
#define _for(i,a,b) for(int i=(a);i<(b);++i)
#define ms(a) memset(a,0,sizeof(a))
#define ms_inf(a) memset(a,0x3f,sizeof(a))
#define ms_ninf(a) memset(a,0xcf,sizeof(a))
#define pb push_back
#define mp make_pair
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
//#define lc (o<<1)
//#define rc (o<<1|1)
//#include<ext/pb_ds/priority_queue.hpp>
//typedef __gnu_pbds::priority_queue<no> heap;  //��ƫ��
typedef long long ll;
typedef unsigned long long ull;
ull MOD=212370440130137957ll;
int mod=1e9+7;
ll INF=1e18;
const int maxn=1e3+10;
const int maxl=360;
const double PI=acos(-1.0);
const double eps=1e-8;
int n;int a[2];
char s[maxn];
int ask(int l,int r)
{
	_for(t,1,n+1)s[t]='1';
	_for(t,l,r+1)s[t]='0';
	cout<<"? "<<s+1<<endl;
	int x;cin>>x;return x;
}
int pre;
void dfs(int l,int r)
{
	if(l==r)
	{
		_for(t,0,2)if(!a[t])a[t]=l;
		return;
	}
	int mid=(l+r)>>1;
	int u=ask(l,mid);
	u=pre-u;
	int len=mid-l+1;
	if(u==len)
	{
		a[0]=l;
		dfs(mid+1,r);
	}
	else if(u==-len)
	{
		a[1]=l;
		dfs(mid+1,r);
	}
	else dfs(l,mid);
}
int main()
{
	fast;pre=ask(1,0);
	dfs(1,n);
	cout<<"! ";
	_for(t,0,2)cout<<a[t]<<" ";
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double db;
typedef std::string str;
#define sei set<int>
#define sell set<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define vvll vector<vll>
#define vld vector<ld>
#define vstr vector<str>
#define vpii vector<pii>
#define vpll vector<pll>
#define all(v) v.begin(),v.end()
#define foa(i,v) for(auto i : v)
#define fo(i,a,b) for(int i=a;i<b;i++)
#define fo_(i,a,b) for(int i=a;i>b;i--)
#define M(a) memset(a,0,sizeof a)
#define M_(a) memset(a ,-1,sizeof a)
#define deb(x)  cerr << #x << " = " << x << endl
#define pb push_back
#define F first
#define S second
#define OK order_of_key
#define FO find_by_order
#define nmax 1000100
const ld PI = 3.141592653589793238462643383279;
const ll inf = std::numeric_limits<ll>::max();
const int infint = std::numeric_limits<int>::max();
const ll mod = 1e9+7;
using namespace __gnu_pbds;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

int n;
int ted[2];
int lnow;

int ask(int i){
    string s;
    fo(j,0,i) s += "1";
    while(s.size() < n) s += "0";
    cout << "? " << s << endl;
    int x;
    cin >> x;
}

int t(int i){
    int now = ask(i);
    return (i+ted[1]-now)/2;
}

int bis(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    lnow = mid;
    int tnow = t(mid);
    if(tnow == mid) return 1;
    if(tnow > 0) return bis(l,mid);
    else return bis(mid+1,r);
}

int bis2(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    if(mid-t(mid) > 0) return bis2(l,mid);
    else return bis2(mid+1,r);
}

int main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    cin >> n;
    ted[1] = ask(0);
    ted[0] = n-ted[1];
    int p1 = bis(1,n);
    if(p1 != 1){
        cout << "! " << 1 << ' ' << p1 << endl;
        return 0;
    }
    int p2 = bis2(lnow+1,min(2*lnow+1,n));
    cout << "! " << p2 << ' ' << p1 << endl;

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double db;
typedef std::string str;
#define sei set<int>
#define sell set<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define vvll vector<vll>
#define vld vector<ld>
#define vstr vector<str>
#define vpii vector<pii>
#define vpll vector<pll>
#define all(v) v.begin(),v.end()
#define foa(i,v) for(auto i : v)
#define fo(i,a,b) for(int i=a;i<b;i++)
#define fo_(i,a,b) for(int i=a;i>b;i--)
#define M(a) memset(a,0,sizeof a)
#define M_(a) memset(a ,-1,sizeof a)
#define deb(x)  cerr << #x << " = " << x << endl
#define pb push_back
#define F first
#define S second
#define OK order_of_key
#define FO find_by_order
#define nmax 1000100
const ld PI = 3.141592653589793238462643383279;
const ll inf = std::numeric_limits<ll>::max();
const int infint = std::numeric_limits<int>::max();
const ll mod = 1e9+7;
using namespace __gnu_pbds;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

int n;
int ted[2];
int lnow;

int ask(int i){
    string s;
    fo(i,0,i) s += "1";
    while(s.size() < n) s += "0";
    cout << "? " << s << endl;
    int x;
    cin >> x;
}

int t(int i){
    int now = ask(i);
    return (i+ted[1]-now)/2;
}

int bis(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    lnow = mid;
    int tnow = t(mid);
    if(tnow == mid) return 1;
    if(tnow > 0) return bis(l,mid);
    else return bis(mid+1,r);
}

int bis2(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    if(mid-t(mid) > 0) return bis2(l,mid);
    else return bis2(mid+1,r);
}

int main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    cin >> n;
    ted[1] = ask(0);
    ted[0] = n-ted[1];
    int p1 = bis(1,n);
    if(p1 != 1){
        cout << "! " << 1 << ' ' << p1 << endl;
        return 0;
    }
    int p2 = bis2(lnow+1,min(2*lnow+1,n));
    cout << "! " << p2 << ' ' << p1 << endl;

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double db;
typedef std::string str;
#define sei set<int>
#define sell set<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define vvll vector<vll>
#define vld vector<ld>
#define vstr vector<str>
#define vpii vector<pii>
#define vpll vector<pll>
#define all(v) v.begin(),v.end()
#define foa(i,v) for(auto i : v)
#define fo(i,a,b) for(int i=a;i<b;i++)
#define fo_(i,a,b) for(int i=a;i>b;i--)
#define M(a) memset(a,0,sizeof a)
#define M_(a) memset(a ,-1,sizeof a)
#define deb(x)  cerr << #x << " = " << x << endl
#define pb push_back
#define F first
#define S second
#define OK order_of_key
#define FO find_by_order
#define nmax 1000100
const ld PI = 3.141592653589793238462643383279;
const ll inf = std::numeric_limits<ll>::max();
const int infint = std::numeric_limits<int>::max();
const ll mod = 1e9+7;
using namespace __gnu_pbds;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

int n;
int ted[2];
int lnow;

int ask(int i){
    string s;
    fo(j,0,i) s += "1";
    while(s.size() < n) s += "0";
    cout << "? " << s << endl;
    int x;
    cin >> x;
    return x;
}

int t(int i){
    int now = ask(i);
    return (i+ted[1]-now)/2;
}

int bis(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    lnow = mid;
    int tnow = t(mid);
    if(tnow == mid) return 1;
    if(tnow > 0) return bis(l,mid);
    else return bis(mid+1,r);
}

int bis2(int l,int r){
    if(l == r) return l;
    int mid = (l+r)/2;
    if(mid-t(mid) > 0) return bis2(l,mid);
    else return bis2(mid+1,r);
}

int main(){
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    cin >> n;
    ted[1] = ask(0);
    ted[0] = n-ted[1];
    int p1 = bis(1,n);
    if(p1 != 1){
        cout << "! " << 1 << ' ' << p1 << endl;
        return 0;
    }
    int p2 = bis2(lnow+1,min(2*lnow+1,n));
    cout << "! " << p2 << ' ' << p1 << endl;

    return 0;
}


#pragma GCC optimze("Ofast")
#include <bits/stdc++.h>

using namespace std;

#ifndef aa
#define trace(...)
#define endl '\n'
#endif
#define pb push_back
# define ub upper_bound
#define lb lower_bound
#define fi first
#define se second
#define int long long
typedef long long ll;
typedef long double ld;
#define double long double
#define pii pair<int,int>
#define pdd pair<double,double>
#define pll pair<ll,ll>
#define sz(x) ((long long)x.size())
#define fr(a,b,c) for(int a=b; a<=c; a++)
#define frev(a,b,c) for(int a=c; a>=b; a--)
#define rep(a,b,c) for(int a=b; a<c; a++)
#define trav(a,x) for(auto &a:x)
#define all(con) con.begin(),con.end()
#define deb(x) cout << x << endl
const ll infl = 0x3f3f3f3f3f3f3f3fLL;
const int infi = 0x3f3f3f3f;
//mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
const int mod = 998244353;
//const int mod = 1000000007;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef map<int, int> mii;
typedef set<int> si;
typedef queue<int> qi;

const int N = 1e5 + 5;

int n;
int z;
int pos0 = -1, pos1 = -1;

int ask(int l, int r) {
	string s;
	fr(i, 1, n) {
		if (i >= l && i <= r)
			s += '1';
		else
			s += '0';
	}
	cout << "? " << s << endl;
	cout << flush;
	int x;
	cin >> x;
	return x;
}

void search(int l, int r) {

	if (l > r)
		return;
	int mid = (l + r) / 2;
	int x = ask(l, mid);
	int del = x - z;
	if (del == mid - l + 1) {
		pos0 = l;
	}
	else if (del == l - mid - 1) {
		pos1 = l;
	}
	search(mid + 1, r);
}

void solve() {

	cin >> n;
	z = ask(0, 0);
	search(1, n);
	cout << "! " << pos0 << " " << pos1 << endl;
	cout << flush;
}

signed main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//srand(chrono::high_resolution_clock::now().time_since_epoch().count());
	cout << fixed << setprecision(15);
	int t = 1;
	//cin >> t;

	while (t--)
		solve();
#ifdef aa
	cout << endl << endl << endl << endl << "Time elapsed: " << (double)(clock() - clk) / CLOCKS_PER_SEC << endl;
#endif
	return 0;
}

int norm(int a) {
	while (a >= mod) a -= mod;
	while (a < 0) a += mod;
	return a;
}

int powm(int a, int b) {
	int res = 1;
	while (b) {
		if (b & 1)
			res = (res * a) % mod;
		a = (a * a) % mod;
		b >>= 1;
	}
	return res;
}

int divide(int a, int b) {
	return (a % mod) * powm(b, mod - 2) % mod;
}


#pragma GCC optimze("Ofast")
#include <bits/stdc++.h>

using namespace std;

#ifndef aa
#define trace(...)
#define endl '\n'
#endif
#define pb push_back
# define ub upper_bound
#define lb lower_bound
#define fi first
#define se second
#define int long long
typedef long long ll;
typedef long double ld;
#define double long double
#define pii pair<int,int>
#define pdd pair<double,double>
#define pll pair<ll,ll>
#define sz(x) ((long long)x.size())
#define fr(a,b,c) for(int a=b; a<=c; a++)
#define frev(a,b,c) for(int a=c; a>=b; a--)
#define rep(a,b,c) for(int a=b; a<c; a++)
#define trav(a,x) for(auto &a:x)
#define all(con) con.begin(),con.end()
#define deb(x) cout << x << endl
const ll infl = 0x3f3f3f3f3f3f3f3fLL;
const int infi = 0x3f3f3f3f;
//mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
const int mod = 998244353;
//const int mod = 1000000007;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef map<int, int> mii;
typedef set<int> si;
typedef queue<int> qi;

const int N = 1e5 + 5;

int n;
int z;
int pos0 = -1, pos1 = -1;

int ask(int l, int r) {
	string s;
	fr(i, 1, n) {
		if (i >= l && i <= r)
			s += '1';
		else
			s += '0';
	}
	cout << "? " << s << endl;
	cout << flush;
	int x;
	cin >> x;
	return x;
}

void search(int l, int r) {

	if (l > r)
		return;
	int mid = (l + r) / 2;
	int x = ask(l, mid);
	int del = x - z;
	if (del == mid - l + 1) {
		pos0 = l;
		search(mid + 1, r);
	}
	else if (del == l - mid - 1) {
		pos1 = l;
		search(mid + 1, r);
	}
	else
		search(l, mid);

}

void solve() {

	cin >> n;
	z = ask(0, 0);
	search(1, n);
	cout << "! " << pos0 << " " << pos1 << endl;
	cout << flush;
}

signed main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//srand(chrono::high_resolution_clock::now().time_since_epoch().count());
	cout << fixed << setprecision(15);
	int t = 1;
	//cin >> t;

	while (t--)
		solve();
#ifdef aa
	cout << endl << endl << endl << endl << "Time elapsed: " << (double)(clock() - clk) / CLOCKS_PER_SEC << endl;
#endif
	return 0;
}

int norm(int a) {
	while (a >= mod) a -= mod;
	while (a < 0) a += mod;
	return a;
}

int powm(int a, int b) {
	int res = 1;
	while (b) {
		if (b & 1)
			res = (res * a) % mod;
		a = (a * a) % mod;
		b >>= 1;
	}
	return res;
}

int divide(int a, int b) {
	return (a % mod) * powm(b, mod - 2) % mod;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
    int n, num;
    cin >> n;
    puts("?");
    for (int i = 1; i <= n; i++)cout << "0";
    puts("");
    cin >> num;
    int l = 1, r = n;
    while (r - l >= 2) {
        int mid = (l + r) >> 1;
        puts("?");
        for (int i = 1; i <= n; i++) {
            if (i >= l && i <= mid)
                cout << "1";
            else
                cout << "0";
        }
        puts("");
        int x1;
        cin >> x1;
        if (abs(num - x1) == (mid - l + 1))
            l = mid;
        else
            r = mid;
    }
    puts("?");
    for (int i = 1; i <= n; i++) {
        if (i == l)cout << "1";
        else cout << "0";
    }
    puts("");
    int x2;
    cin >> x2;
    if (x2 < num) printf("! %d %d\n", r, l);
    else printf("! %d %d\n", l, r);
}


#include <bits/stdc++.h>

#define ll long long
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define vi vector<int>
#define pii pair<int, int>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
using namespace std;
template<typename T>
using minpq = priority_queue<T, vector<T>, greater<T>>;

int n;

int ask(string &s) {
    // int x = 0;
    // rep(i, 0, n) {
    //     x += (s[i] != t[i]);
    // }
    cout << "? " << s << endl;
    // cout << x << endl;
    int x;
    cin >> x;
    return x;
}
void answer(int p0, int p1) {
    cout << "! " << p0 + 1 << ' ' << p1 + 1 << endl;
}

int solve(char c0, char c1) {
    string s(n, c0);
    int L = 0, R = n - 1;
    int d = ask(s);
    while(L < R) {
        int m = (L + R) / 2;
        fill(s.begin() + L, s.begin() + m + 1, c1);
        int x = ask(s);
        fill(s.begin() + L, s.begin() + m + 1, c0);
        if(x == d - (m - L + 1)) {
            L = m + 1;
        }else {
            R = m;
        }
    }
    return L;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n;
    int p0 = solve('0', '1');
    int p1 = solve('1', '0');
    answer(p0, p1);
}


#include <bits/stdc++.h>

#define ll long long
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define vi vector<int>
#define pii pair<int, int>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
using namespace std;
template<typename T>
using minpq = priority_queue<T, vector<T>, greater<T>>;

int n;
string t = "101";

int ask(string &s) {
    // int x = 0;
    // rep(i, 0, n) {
    //     x += (s[i] != t[i]);
    // }
    cout << "? " << s << endl;
    // cout << x << endl;
    int x;
    cin >> x;
    return x;
}
void answer(int p0, int p1) {
    cout << "! " << p0 + 1 << ' ' << p1 + 1 << endl;
}

pii solve() {
    string s(n, '0');
    int L = 0, R = n - 1;
    int d = ask(s);
    int p0 = -2, p1 = -2;
    while(L < R) {
        int m = (L + R) / 2;
        fill(s.begin() + L, s.begin() + m + 1, '1');
        int x = ask(s);
        fill(s.begin() + L, s.begin() + m + 1, '0');
        if(x == d - (m - L + 1)) {
            p1 = L;
            L = m + 1;
        }else if(x == d + (m - L + 1)) {
            p0 = L;
            L = m + 1;
        }else {
            R = m;
        }
    }
    if(p0 < 0) p0 = L;
    if(p1 < 0) p1 = L;
    return {p0, p1};
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n;
    int p0, p1;
    tie(p0, p1) = solve();
    answer(p0, p1);
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			break;
		}
		else
		{
			e = mid;
		}
	}

	if(one == 0 and b == 0)
	{
		int i;
		while(1)
		{
			i++;
		}
	}

	if(one)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				zero = s;
				break;
			}
			else if(zer == 0)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}
		}
	}
	else
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				s = mid + 1;
			}
			else if(zer == 0)
			{
				one = mid;
				break;
			}
			else
			{
				e = mid;
			}
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;
int pre;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void find_zer(int s, int e)
{
	while(s <= e)
	{
		if(s == e)
		{
			zer = s;
			return;
		}

		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			return;
		}
		else if(zer == 0)
		{
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}
}

void find_one(int s, int e)
{
	while(s <= e)
	{
		if(s == e)
		{
			one = s;
			return;
		}

		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			s = mid + 1;
		}
		else if(zer == 0)
		{
			one = mid;
			return;
		}
		else
		{
			e = mid;
		}
	}
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			find_one(mid + 1, e);
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			find_zer(mid + 1, e);
			break;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			s = mid + 1;
		}
		else if(zer == 0)
		{
			one = mid;
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;

	while(s <= e)
	{

		if(one != -1 and zero != -1)
			break;

		int mid = (s + e) >> 1;

		int val = query(s, mid);

		if(val == 0)
		{
			one = s;
		}

		if(val == mid - s + 1)
		{
			zero = s;
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;
	int rest = 0;
	int x, y, z;

	int prev = query(1, n);

	int prevmid;
	int prevend;

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid) - rest;
		int cur = val;
		x = prev + cur - e + mid;
		x >>= 1;
		y = prev - x;
		z = cur - x;

		rest += z;

		if(x == 0)
		{
			one = s;
			break;
		}
		else if(x == mid - s + 1)
		{
			zero = s;
			break;
		}
		else
		{
			e = mid;
		}

		prev = val;
		prevmid = mid;
		prevend = e;
	}

	s = prevmid + 1;
	e = prevend;

	if(one != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				s = mid + 1;
			}
			else if(x == mid - s + 1)
			{
				zero = s;
				break;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
		}
	}
	else if(zero != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				one = s;
				break;
			}
			else if(x == mid - s + 1)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			break;
		}
		else
		{
			e = mid;
		}
	}

	if(one)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				zero = s;
				break;
			}
			else if(zer == 0)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}
		}
	}
	else
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				s = mid + 1;
			}
			else if(zer == 0)
			{
				one = mid;
				break;
			}
			else
			{
				e = mid;
			}
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;
	int rest = 0;
	int x, y, z;

	int prev = query(1, n);

	int prevmid;
	int prevend;

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid) - rest;
		int cur = val;
		x = prev + cur - e + mid;
		x >>= 1;
		y = prev - x;
		z = cur - x;

		rest += z;

		if(x == 0)
		{
			one = s;
			break;
		}
		else if(x == mid - s + 1)
		{
			zero = s;
			break;
		}
		else
		{
			e = mid;
		}

		prev = val;
		prevmid = mid;
		prevend = e;
	}

	s = prevmid + 1;
	e = prevend;

	if(one != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				s = mid + 1;
			}
			else if(x == mid - s + 1)
			{
				zero = s;
				break;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
		}
	}
	else if(zero != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				one = s;
				break;
			}
			else if(x == mid - s + 1)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
		}
	}

	if(one == -1 or  zero == -1)
	{
		int i;
		while(1)
		{
			i++;
		}
	}
	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			break;
		}
		else
		{
			e = mid;
		}
	}

	if(one == 0 and zero == 0)
	{
		int i;
		while(1)
		{
			i++;
		}
	}

	if(one)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				zero = s;
				break;
			}
			else if(zer == 0)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}
		}
	}
	else
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - n) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				s = mid + 1;
			}
			else if(zer == 0)
			{
				one = mid;
				break;
			}
			else
			{
				e = mid;
			}
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;
	int rest = 0;
	int x, y, z;

	int prev = query(1, n);

	int prevmid;
	int prevend;
	int prevrest;

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid) - rest;
		int cur = val;
		x = prev + cur - e + mid;
		x >>= 1;
		y = prev - x;
		z = cur - x;

		rest += z;

		if(x == 0)
		{
			one = s;
			break;
		}
		else if(x == mid - s + 1)
		{
			zero = s;
			break;
		}
		else
		{
			e = mid;
		}

		prev = val;
		prevmid = mid;
		prevend = e;
		prevrest = rest;
	}

	s = prevmid + 1;
	e = prevend;
	rest = prevrest;

	if(one != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				s = mid + 1;
			}
			else if(x == mid - s + 1)
			{
				zero = s;
				break;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
			prevrest = rest;
		}
	}
	else if(zero != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid) - rest;
			int cur = val;

			x = prev + cur - e + mid;
			x >>= 1;
			y = prev - x;
			z = cur - x;

			rest += z;

			if(x == 0)
			{
				one = s;
				break;
			}
			else if(x == mid - s + 1)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}

			prev = val;
			prevmid = mid;
			prevend = e;
			prevrest = rest;
		}
	}

	if(one == -1 or  zero == -1)
	{
		int i;
		while(1)
		{
			i++;
		}
	}
	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - (mid - s + 1)) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			break;
		}
		else
		{
			e = mid;
		}
	}

	if(one)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - (mid - s + 1)) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				zero = s;
				break;
			}
			else if(zer == 0)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}
		}
	}
	else
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			int zer = pre - ((pre + val - (mid - s + 1)) >> 1);
			int siz = mid - s + 1;

			if(zer == siz)
			{
				s = mid + 1;
			}
			else if(zer == 0)
			{
				one = mid;
				break;
			}
			else
			{
				e = mid;
			}
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;
int pre;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void find_zer(int s, int e)
{
	while(s <= e)
	{
		if(s == e)
		{
			zero = s;
			return;
		}

		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			return;
		}
		else if(zer == 0)
		{
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}
}

void find_one(int s, int e)
{
	while(s <= e)
	{
		if(s == e)
		{
			one = s;
			return;
		}

		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			s = mid + 1;
		}
		else if(zer == 0)
		{
			one = mid;
			return;
		}
		else
		{
			e = mid;
		}
	}
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			find_one(mid + 1, e);
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			find_zer(mid + 1, e);
			break;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;

	int prev = query(1, n);

	int prevmid;
	int prevend;

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);

		if(val == 0)
		{
			one = s;
			break;
		}
		else if(val == mid - s + 1)
		{
			zero = s;
			break;
		}
		else
		{
			e = mid;
		}

		prevmid = mid;
		prevend = e;
	}

	s = prevmid + 1;
	prevend = e;

	if(one != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);

			if(val == 0)
			{
				s = mid + 1;
			}
			else if(val == mid - s + 1)
			{
				zero = s;
				break;
			}
			else
			{
				e = mid;
			}
		}
	}
	else if(zero != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);

			if(val == 0)
			{
				one = s;
				break;
			}
			else if(val == mid - s + 1)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;

	int pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - (mid - s + 1)) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			s = mid + 1;
		}
		else if(zer == 0)
		{
			one = mid;
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 0;
	for(int i = s; i <= e; i++)
		cout << 1;
	for(int i = e + 1; i <= n; i++)
		cout << 0;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = -1;
	zero = -1;

	int prev = query(1, n);

	int prevmid;
	int prevend;

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		val = prev - val;

		if(val == 0)
		{
			one = s;
			break;
		}
		else if(val == mid - s + 1)
		{
			zero = s;
			break;
		}
		else
		{
			e = mid;
		}

		prevmid = mid;
		prevend = e;
	}

	s = prevmid + 1;
	prevend = e;

	if(one != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			val = prev - val;
			if(val == 0)
			{
				s = mid + 1;
			}
			else if(val == mid - s + 1)
			{
				zero = s;
				break;
			}
			else
			{
				e = mid;
			}

			prev = val;
		}
	}
	else if(zero != -1)
	{
		while(s <= e)
		{
			int mid = (s + e) >> 1;
			int val = query(s, mid);
			val = prev - val;
			if(val == 0)
			{
				one = s;
				break;
			}
			else if(val == mid - s + 1)
			{
				s = mid + 1;
			}
			else
			{
				e = mid;
			}

			prev = val;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define vvi             vector<vector<int>>
#define ld              long double
#define mod             1000000007
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vpii            vector<pair<int,int>>
#define fr(i,a,b)       for(int i = a; i < b; i += 1)
#define all(x)          x.begin(),x.end()
#define sz(a)           (int)(a.size())
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define input(a)        for(auto it = a.begin(); it != a.end(); it++) { int value; cin >> value; *it = value;}
//#define print(a)        for(auto it = a.begin() ; it != a.end() ; it++){ cout << *it << " " ;}cout << '\n';
#define SS                      stringstream
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}

const int dirx[4] = {0, 0, -1, 1};
const int diry[4] = {-1, 1, 0, 0};

// 0 -> l, 1 - > r, 2 -> u , 3 -> down
void FASTIO()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

const int mxN = 2e6 + 10;
int n;
int one;
int zero;
int pre;

int query(int s, int e)
{
	cout << "? ";
	for(int i = 1; i < s; i++)
		cout << 1;
	for(int i = s; i <= e; i++)
		cout << 0;
	for(int i = e + 1; i <= n; i++)
		cout << 1;
	cout << endl;
	int x;
	cin >> x;
	return x;
}

void find_zer(int s, int e)
{
	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			return;
		}
		else if(zer == 0)
		{
			s = mid + 1;
		}
		else
		{
			e = mid;
		}
	}
}

void find_one(int s, int e)
{
	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			s = mid + 1;
		}
		else if(zer == 0)
		{
			one = mid;
			return;
		}
		else
		{
			e = mid;
		}
	}
}

void test_case()
{
	cin >> n;
	int s = 1;
	int e = n;
	one = 0;
	zero = 0;

	pre = query(1, 0);

	while(s <= e)
	{
		int mid = (s + e) >> 1;
		int val = query(s, mid);
		int zer = pre - ((pre + val - n) >> 1);
		int siz = mid - s + 1;

		if(zer == siz)
		{
			zero = s;
			find_one(mid + 1, e);
			break;
		}
		else if(zer == 0)
		{
			one = mid;
			find_zer(mid + 1, e);
			break;
		}
		else
		{
			e = mid;
		}
	}

	cout << "! " << zero << " " << one << endl;
}

int32_t main()
{
	FASTIO();

	int t;
	t = 1;
	//cin >> t;

	for(int i = 1; i <= t; i++)
	{
		//cout << "Case #" << i << ": ";
		test_case();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int,int>
#define mod 1000000007
#define endl "\n"

int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
// x<<1 => x*2		x>>1 => x/2;	cout<<flush;

void solve()
{
	int n,i;
	cin>>n;
	int a[n],pos[2],prev,new_val;
	pos[0]=pos[1]=0;
	for(i=0;i<n;i++)	a[i]=0;
	cout<<"? ";
	for(i=0;i<n;i++)	cout<<a[i];
	cout<<endl<<flush;
	cin>>prev;
	int low=0,high=n,mid;
	while(low<=high)
	{
		mid=(low+high)/2;
		for(i=low;i<=mid;i++)
			a[i]=1-a[i];
		int val=mid-low+1;
		cout<<"? ";
		for(i=0;i<n;i++)	cout<<a[i];
		cout<<endl<<flush;
		cin>>new_val;
		if(new_val==prev-val)
		{
			pos[a[low]]=low+1;
			if(mid==low)
				pos[1-a[low]]=low+2;
			low=mid+1;

		}
		else if(new_val==prev+val)
		{
			pos[1-a[low]]=low+1;
			if(mid==low)
				pos[a[low]]=low+2;
			low=mid+1;
		}
		else
			high=mid-1;
		prev=new_val;
	}
	cout<<pos[0]<<" "<<pos[1]<<endl;
}

int32_t main()
{
	ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	int t=1;//cin>>t;
	while(t--)	solve();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int,int>
#define mod 1000000007
#define endl "\n"

int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
// x<<1 => x*2		x>>1 => x/2;	cout<<flush;

void solve()
{
	int n,i;
	cin>>n;
	int a[n],pos[2],prev,new_val;
	pos[0]=pos[1]=0;
	for(i=0;i<n;i++)	a[i]=0;
	cout<<"? ";
	for(i=0;i<n;i++)	cout<<a[i];
	cout<<endl<<flush;
	cin>>prev;
	int low=0,high=n-1,mid;
	while(low<=high)
	{
		mid=(low+high)/2;
		for(i=low;i<=mid;i++)
			a[i]=1-a[i];
		int val=mid-low+1;
		cout<<"? ";
		for(i=0;i<n;i++)	cout<<a[i];
		cout<<endl<<flush;
		cin>>new_val;
		if(new_val==prev-val)
		{
			pos[a[low]]=low+1;
			if(mid==low && !pos[1-a[low]])
				pos[1-a[low]]=low+2;
			low=mid+1;

		}
		else if(new_val==prev+val)
		{
			pos[1-a[low]]=low+1;
			if(mid==low && !pos[a[low]])
				pos[a[low]]=low+2;
			low=mid+1;
		}
		else
			high=mid-1;
		prev=new_val;
	}
	cout<<"! "<<pos[0]<<" "<<pos[1]<<endl;
}

int32_t main()
{
	//ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	int t=1;//cin>>t;
	while(t--)	solve();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int,int>
#define mod 1000000007
#define endl "\n"

int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
// x<<1 => x*2		x>>1 => x/2;	cout<<flush;

void solve()
{
	int n,i;
	cin>>n;
	int a[n],pos[2],prev,new_val;
	pos[0]=pos[1]=0;
	for(i=0;i<n;i++)	a[i]=0;
	cout<<"? ";
	for(i=0;i<n;i++)	cout<<a[i];
	cout<<endl<<flush;
	cin>>prev;
	int low=0,high=n-1,mid;
	while(low<=high)
	{
		mid=(low+high)/2;
		for(i=low;i<=mid;i++)
			a[i]=1-a[i];
		int val=mid-low+1;
		cout<<"? ";
		for(i=0;i<n;i++)	cout<<a[i];
		cout<<endl<<flush;
		cin>>new_val;
		if(new_val==prev-val)
		{
			pos[a[low]]=low+1;
			if(mid==low)
				pos[1-a[low]]=low+2;
			low=mid+1;

		}
		else if(new_val==prev+val)
		{
			pos[1-a[low]]=low+1;
			if(mid==low)
				pos[a[low]]=low+2;
			low=mid+1;
		}
		else
			high=mid-1;
		prev=new_val;
	}
	cout<<"! "<<pos[0]<<" "<<pos[1]<<endl;
}

int32_t main()
{
	//ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	int t=1;//cin>>t;
	while(t--)	solve();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int,int>
#define mod 1000000007
#define endl "\n"

int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
// x<<1 => x*2		x>>1 => x/2;	cout<<flush;

void solve()
{
	int n,i;
	cin>>n;
	int a[n],pos[2],prev,new_val;
	pos[0]=pos[1]=0;
	for(i=0;i<n;i++)	a[i]=0;
	cout<<"? ";
	for(i=0;i<n;i++)	cout<<a[i];
	cout<<endl<<flush;
	cin>>prev;
	int low=0,high=n,mid;
	while(low<=high)
	{
		mid=(low+high)/2;
		for(i=low;i<=mid;i++)
			a[i]=1-a[i];
		int val=mid-low+1;
		cout<<"? ";
		for(i=0;i<n;i++)	cout<<a[i];
		cout<<endl<<flush;
		cin>>new_val;
		if(new_val==prev-val)
		{
			pos[a[low]]=low+1;
			if(mid==low && !pos[1-a[low]])
				pos[1-a[low]]=low+2;
			low=mid+1;

		}
		else if(new_val==prev+val)
		{
			pos[1-a[low]]=low+1;
			if(mid==low && !pos[a[low]])
				pos[a[low]]=low+2;
			low=mid+1;
		}
		else
			high=mid-1;
		prev=new_val;
	}
	cout<<"! "<<pos[0]<<" "<<pos[1]<<endl;
}

int32_t main()
{
	//ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	int t=1;//cin>>t;
	while(t--)	solve();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define pr pair<int,int>
#define mod 1000000007
#define endl "\n"
int pos0,pos1,total,ans,n;
string s;

int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
// x<<1 => x*2		x>>1 => x/2;	cout<<flush;

int query(string s)
{
	cout<<"? "<<s<<endl;
	cout<<flush;
	cin>>ans;
	return n-ans;
}

int check(int l,int r)
{
	string x=s;
	for(int i=l;i<=r;i++)	x[i]='0';
	return query(x);
}

void bs1(int low,int high)
{
	if(low>high)	return;
	int mid=(low+high)/2;
	int val=check(low,mid)-total;
	if(val==-(mid-low+1))
		pos1=low+1;
	else if(val==(mid-low+1))
		bs1(mid+1,high);
	else
		bs1(low,mid);
}

void bs0(int low,int high)
{
	if(low>high)	return;
	int mid=(low+high)/2;
	int val=check(low,mid)-total;
	if(val==-(mid-low+1))
		bs0(mid+1,high);
	else if(val==(mid-low+1))
		pos0=low+1;
	else
		bs0(low,mid);
}

void bs(int low,int high)
{
	if(low>high)	return;
	int mid=(low+high)/2;
	int val=check(low,mid)-total;
	if(val==-(mid-low+1))
		pos1=low+1,bs0(mid+1,high);
	else if(val==(mid-low+1))
		pos0=low+1,bs1(mid+1,high);
	else
		bs(low,mid);
}

void solve()
{
	int i;
	cin>>n;
	s=string(n,'1');
	total=query(s);
	bs(0,n-1);
	cout<<"! "<<pos0<<" "<<pos1<<endl;
}

int32_t main()
{
	//ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
	int t=1;//cin>>t;
	while(t--)	solve();
	return 0;
}