#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define maxn 500005
#define mi LLONG_MIN
#define ma LLONG_MAX
#define mod 1000000007
#define pb push_back
#define S second
#define F first
int ask(string s) {
int ans;
cout << "? " << s << endl;
cin >> ans;
return ans;
}
void answer(int a, int b) {
if(a > b) swap(a, b);
cout << "! " << a << " " << b << endl;
exit(0);
}
void solve() {
int n;
cin >> n;
string s = "000";
for (int i = 0; i < 3; i++) {
s[i] = '1';
int ans = ask(s);
if (ans == 2) {
answer((i - 1 + 3) % 3 + 1, (i + 1 + 3) % 3 + 1);
}
s[i] = '0';
}
}
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t = 1;
// cin >> t;
while (t--) solve();
}