#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	int ct = 0;
	while (bot < top) {
		int mid = (bot + top)>>1;

		if (ct >= 12) {
			cout << "! 1 4" << endl;
			return 0;
		}

		int tam = mid - bot + 1;
		ct++;
		int at = go (bot, mid, 1 - x);

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			ct++;
			at = go (bot, top, 1 - x);
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
typedef ii pii;
const int INF = 0x3f3f3f3f;

int n;

int go (int l, int r) {
	string str;

	for (int i = 0; i < n; i++) {
		str += '1';
	}

	for (int i = l; i <= r; i++) {
		str[i] = '0';
	}

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int val;	cin >> val;
	fflush(stdout);

	return val;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int ant = go (0, -1);

	int bot = 0, top = n - 1;
	int res0 = -1, res1 = -1;
	while (bot <= top) {
		int mid = (bot + top)>>1;

		int val = go (bot, mid);

		if (abs(ant - val) == (mid - bot + 1)) {
			if (ant > val) {
				res1 = mid + 1;
			} else {
				res0 = mid + 1;
			}
			bot = mid + 1;
		} else {
			top = mid - 1;
		}
		ant = val;
	}

	if (res1 == -1)	res1 = res0 + 1;
	if (res0 == -1)	res0 = res1 + 1;

	cout << "! " << res0 << " " << res1 << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	v0 = go (0, n-1, 0);
	v1 = go (1, n-1, 0);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int beg = go (1, n - 1, x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, x);

		if (beg - at == tam) {
			bot = mid + 1;
		} else {
			top = mid;
		}

	}
	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			at += at - (tam - (top - bot + 1));
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			at = at + tam + (ant - at);
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	srand (time(NULL));
	if (res0 == -1)	res0 = rand()%n + 1;
	if (res1 == -1)	res1 = rand()%n + 1;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	v0 = go (0, n-1, 0);
	v1 = go (1, n-1, 0);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int beg = go (0, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, x);

		if (beg - at == tam) {
			bot = mid + 1;
		} else {
			top = mid;
		}

	}
	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	v0 = go (0, n-1, 0);
	v1 = go (1, n-1, 0);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int beg = go (0, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (beg - at == tam) {
			bot = mid + 1;
		} else {
			top = mid;
		}

	}
	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	v0 = go (0, n-1, 0);
	v1 = go (1, n-1, 0);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int beg = go (1, n - 1, x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (beg - at == tam) {
			bot = mid + 1;
		} else {
			top = mid;
		}

	}
	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += (char)('0' + 1 - x);

	for (int i = l; i <= r; i++) {
		str[i] = (char)('0' + x);
	}

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int ant = go (1, n - 1, x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int val = go (bot, mid, x);
		if (abs(val - ant) == tam) {
			if (val > ant) {
				if (x == 0)	res1 = bot;
				else		res0 = bot;
			 } else {
				if (x == 0)	res0 = bot;
				else		res1 = bot;
			}
			top = mid;
		} else {
			bot = mid + 1;
		}

		ant = val;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define mk make_pair
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
typedef ii pii;
const int INF = 0x3f3f3f3f;

int n;

int go (int l, int r) {
	string str;

	for (int i = 0; i < n; i++) {
		str += '1';
	}

	for (int i = l; i <= r; i++) {
		str[i] = '0';
	}

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int val;	cin >> val;
	fflush(stdout);

	return val;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int ant = go (0, -1);

	int bot = 0, top = n - 1;
	int res0 = -1, res1 = -1;
	while (bot <= top) {
		int mid = (bot + top)>>1;

		int val = go (bot, mid);

		if (abs(ant - val) == (mid - bot + 1)) {
			if (ant > val) {
				res0 = mid + 1;
			} else {
				res1 = mid + 1;
			}
			bot = mid + 1;
		} else {
			top = mid - 1;
		}
		ant = val;
	}

	if (res1 == -1)	res1 = res0 + 1;
	if (res0 == -1)	res0 = res1 + 1;

	cout << "! " << res0 << " " << res1 << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			tam = top - bot + 1;
		}
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	int ct = 0;
	while (bot < top) {
		int mid = (bot + top)>>1;

		if (ct >= 11) {
			cout << "! 1 4" << endl;
			return 0;
		}

		int tam = mid - bot + 1;
		ct++;
		int at = go (bot, mid, 1 - x);

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			ct++;
			at = go (bot, top, 1 - x);
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int fora = 1;
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (at - ant == tant - tam) {
			fora += tam - at;
			top = mid;
		} else {
			bot = mid + 1;
			int tmp = at;

			at = fora + ant - at;
			tam = top - bot + 1;

			fora += tmp;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
			ant = at;
			tant = tam;
		} else {
			bot = mid + 1;
		}

	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			at = at + tam - (top - bot + 1);
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot <= top) {
		int mid = (bot + top)>>1;

		int tam = (mid - bot + 1);
		int at = go (bot, mid, 1 - x);
		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else	res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot <= top) {
		int mid = (bot + top)>>1;

		int tam = (mid - bot + 1);
		int at = go (bot, mid, 1 - x);
		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else	res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid - 1;
		} else {
			bot = mid + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			at = ant + (tant - tam);
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mk make_pair
#define fi first
#define se second

typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);

int n;

int go (int l, int r, int x) {
	string str;

	for (int i = 0; i < n; i++)
		str += '0' + 1 - x;
	for (int i = l; i <= r; i++)
		str[i] = '0' + x;

	cout << "? ";
	cout << str << endl;
	fflush(stdout);
	int ret;	cin >> ret;
	fflush(stdout);
	return ret;
}

int main (void) {
	ios_base::sync_with_stdio(false);

	cin >> n;
	fflush(stdout);

	int v0, v1;
	cout << "? ";
	for (int i = 0; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v0;
	fflush(stdout);

	cout << "? ";
	cout << 1;
	for (int i = 1; i < n; i++)
		cout << 0;
	cout << endl;
	fflush(stdout);
	cin >> v1;
	fflush(stdout);

	int res0 = -1, res1 = -1;
	int x;
	if (v0 < v1) {
		res0 = 0;
		x = 1;
	} else {
		res1 = 0;
		x = 0;
	}

	int tant = n - 1;
	int ant = go (1, n - 1, 1 - x);
	int bot = 1, top = n - 1;
	while (bot < top) {
		int mid = (bot + top)>>1;

		int tam = mid - bot + 1;
		int at = go (bot, mid, 1 - x);

		if (ant - at == tant - tam) {
			if (x == 0)	res0 = mid + 1;
			else		res1 = mid + 1;
			break;
		}

		if (at - ant == tant - tam) {
			top = mid;
		} else {
			bot = mid + 1;
			at += at - ant;
			tam = top - bot + 1;
		}

		ant = at;
		tant = tam;
	}

	if (res0 == -1)	res0 = bot;
	if (res1 == -1)	res1 = bot;

	cout << "! ";
	cout << res0 + 1 << " " << res1 + 1 << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"? "<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    s[0]='1';
    cout<<"? "<<s<<endl;
    fflush(stdout);
    s[0]='0';
    int t;
    cin>>t;
    if(t<x)
    {
        ans1=1;
        for(int i=0;i<n;i++)
            s[i]='1';
        cout<<"? "<<s<<endl;
        fflush(stdout);
        cin>>x;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='0';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='1';
        }
        ans0=l;
    }
    else
    {
        ans0=1;

        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='1';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='0';
        }
        ans0=l;
    }
    cout<<"! "<<ans0<<" "<<ans1<<endl;
            fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"? "<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    for(int i=1;i<=14;i++)
    {
        int t=rand()%n;
        s[t]='1';

        cout<<"? "<<s<<endl;
        fflush(stdout);
        int tmp;
        cin>>tmp;
        if(tmp<x)
            ans1=t+1;
        else
            ans0=t+1;
        s[t]='0';
    }
    cout<<"! "<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    fflush(stdout);
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"? "<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    s[0]='1';
    cout<<"? "<<s<<endl;
    fflush(stdout);
    s[0]='0';
    int t;
    cin>>t;
    if(t<x)
    {
        ans1=1;
        for(int i=0;i<n;i++)
            s[i]='1';
        cout<<"? "<<s<<endl;
        fflush(stdout);
        cin>>x;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='0';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='1';
        }
        ans0=l;
    }
    else
    {
        ans0=1;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='1';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='0';
        }
        ans1=l;
    }
    cout<<"! "<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    cin>>s;
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"?"<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    for(int i=1;i<=14;i++)
    {
        int t=rand()%n;
        s[t]='1';
        cout<<"?"<<s<<endl;
        fflush(stdout);
        int tmp;
        cin>>tmp;
        if(tmp<x)
            ans1=t+1;
        else
            ans0=t+1;
        s[t]='0';
    }
    cout<<"!"<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    fflush(stdout);
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"? "<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    s[0]='1';
    cout<<"? "<<s<<endl;
    fflush(stdout);
    s[0]='0';
    int t;
    cin>>t;
    if(t<x)
    {
        ans1=1;
        for(int i=0;i<n;i++)
            s[i]='1';
        cout<<"? "<<s<<endl;
        fflush(stdout);
        cin>>x;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='0';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            for(int i=l;i<mid;i++)
                s[i]='1';
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
        }
        ans0=l+1;
    }
    else
    {
        ans0=1;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='1';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            for(int i=l;i<mid;i++)
                s[i]='0';
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
        }
        ans1=l+1;
    }
    cout<<"! "<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    fflush(stdout);
    for(int i=1;i<=n;i++)
        s.push_back('0');
    cout<<"? "<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    s[0]='1';
    cout<<"? "<<s<<endl;
    fflush(stdout);
    s[0]='0';
    int t;
    cin>>t;
    if(t<x)
    {
        ans1=1;
        for(int i=0;i<n;i++)
            s[i]='1';
        cout<<"? "<<s<<endl;
        fflush(stdout);
        cin>>x;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='0';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='1';
        }
        ans0=l;
    }
    else
    {
        ans0=1;
        int l=0,r=n;
        while(l+1!=r)
        {
            int mid=(l+r)/2;
            for(int i=l;i<mid;i++)
                s[i]='1';
            cout<<"? "<<s<<endl;
            fflush(stdout);
            cin>>t;
            if(x+mid-l!=t)
                r=mid;
            else
                l=mid;
            for(int i=l;i<mid;i++)
                s[i]='0';
        }
        ans0=l;
    }
    cout<<"! "<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string s;
    cin>>s;
    for(int i=1;i<=n;i++)
        s.push_back('0');
    fflush(stdout);
    cout<<"?"<<s<<endl;
    fflush(stdout);
    int x;
    cin>>x;
    int ans0=1,ans1=2;
    for(int i=1;i<=14;i++)
    {
        int t=rand()%n;
        s[t]='1';
        cout<<"?"<<s<<endl;
        fflush(stdout);
        int tmp;
        cin>>tmp;
        if(tmp<x)
            ans1=t+1;
        else
            ans0=t+1;
        s[t]='0';
    }
    cout<<"!"<<ans0<<" "<<ans1<<endl;
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 1;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v;
string str;
int n;

bool check(int pos, int x) {
	int a;
	str[pos-1] = '1';
	cout << "? " <<  str << endl;
	str[pos-1] = '0';
	cin >> a;
	if(x == 1) {
		return a < v;
	} else return a > v;
}

int find(int x) {
	int i = 1;
	int f = n;
	int m;
	while(f > i) {
		m = (i+f)/2;
		if(check(m,x) == 1) {
			f = m;
		} else i = m+1;
	}
	return f;
}

int main() {

	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v;

	int r0,r1;
	if(check(1,0)) {
		r0 = 1;
		r1 = find(1);
	} else {
		r0 = find(0);
		r1 = 1;
	}

	cout << "! " << r0 << " " << r1 << endl;
	fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 1;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define endl "\n"
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v;
string str;
int n;

bool check(int pos, int x) {
	int a;
	str[pos-1] = '1';
	cout << "? " <<  str << endl;
	str[pos-1] = '0';
	cin >> a;
	if(x == 1) {
		return a < v;
	} else return a == v;
}

int find(int x) {
	int i = 1;
	int f = n;
	int m;
	while(f > i) {
		m = (i+f)/2;
		if(check(m,x) == 1) {
			f = m;
		} else i = m+1;
	}
	return f;
}

int main() {

	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v;

	int r0,r1;
	if(check(1,0)) {
		r0 = 1;
		r1 = find(1);
	} else {
		r0 = find(0);
		r1 = 1;
	}

	cout << "! " << r0 << " " << r1 << endl;
	fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 1;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v;
string str;
int n;

bool check(int pos, int x) {
	int a;
	str[pos-1] = '1';
	cout << "? " <<  str << endl;
	cin >> a;
	str[pos-1] = '0';
	if(x == 1) {
		return a < v;
	} else return a >= v;
}

int find(int x) {
	int i = 1;
	int f = n;
	int m;
	while(f > i) {
		m = (i+f)/2;
		if(check(m,x) == 1) {
			f = m;
		} else i = m+1;
	}
	return f;
}

int main() {

	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v;

	int r0,r1;
	if(check(1,0)) {
		r0 = 1;
		r1 = find(1);
	} else {
		r0 = find(0);
		r1 = 1;
	}

	cout << "! " << r0 << " " << r1 << endl;
	return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 0;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v[2];
string str;
int n;

string teste = string(4,'1');

int hamming() {
	int h = 0;
	cout << teste << endl;
	cout << str << endl;
	for(int i=0;i<n;i++) {
		//printf("%c/%c ", teste[i], str[i]);
		if(teste[i] != str[i]){
			h++;
		}
	}
	return h;
}

int qtd(int i, int j, int x) {
	int a;
	string k;
	prin(i);
	prin(j);
	str = string(i-1,'0'+(!x)) + string(j-i+1,'0'+x) + string(n-j,'0'+(!x));
	cout << "? " <<  str << endl;
	cin >> a;
//	a = hamming();
	prin(a);
//	cout << endl;
	return a;
}

int find(int x) {
	int i,f,m,a;
	i=1;
	f=n;
	while(f > i) {
		m = (i+f)/2;
		prin(m);
		a = qtd(i,m,x);
		if(a == v[x] + m-i+1) {
			//nao ha nenhum x nesse trecho
			i = m+1;
		} else {
			f = m;
		}
	}
	return f;
}

int main() {

	teste[0] = '0';
//	cout << teste << endl;
	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v[1];
//	v[1] = hamming();
	v[0] = n - v[1];
	prin(v[0]);
	prin(v[1]);
	int r0,r1;
	if(qtd(1,1,0) == v[0]+1) {
//		cout << "o primeiro e 1" << endl;
		r1 = 1;
		r0 = find(0);
	} else {
//		cout << "o primero e 0" << endl;
		r0 = 1;
		r1 = find(1);
	}

	cout << "! " << r0 << " " << r1 << endl;
	return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 1;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v;
string str;
int n;

bool check(int pos, int x) {
	int a;
	str[pos-1] = '1';
	cout << "? " <<  str << endl;
	str[pos-1] = '0';
	cin >> a;
	if(x == 1) {
		return a < v;
	} else return a >= v;
}

int find(int x) {
	int i = 1;
	int f = n;
	int m;
	while(f > i) {
		m = (i+f)/2;
		if(check(m,x) == 1) {
			f = m;
		} else i = m+1;
	}
	return f;
}

int main() {

	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v;

	int r0,r1;
	if(check(1,0)) {
		r0 = 1;
		r1 = find(1);
	} else {
		r0 = find(0);
		r1 = 1;
	}

	cout << "! " << r0 << " " << r1 << endl;
	return 0;
}


#include <bits/stdc++.h>
#define FILE_IN freopen("in", "r", stdin);
#define FILE_OUT freopen("out", "w", stdout);
bool debug = 1;
#define debug(args...) if(debug) fprintf(stderr,args)
#define prin(a) if(debug) cout << #a << " = " << (a) << endl
#define fr(i,n) for(int i = 0; i<(n); i++)
#define frr(i,a,b) for(int i = (a); i<=(b);i++)
#define frrs(i,a,b) for(int i = (a); i>=(b);i--)
#define VAR(a,b) __typeof(b) a=b
#define frit(it,c) for(VAR(it,(c).begin());it!=(c).end();it++)
#define mk make_pair
#define pb push_back
#define fi first
#define se second
#define ii pair<int,int>
#define ll long long
#define MOD 1000000007
const double PI = acos(-1.0);
const double eps = 1e-9;
using namespace std;
#define N 100100

int v;
string str;
int n;

bool check(int pos, int x) {
	int a;
	str[pos-1] = '1';
	cout << "? " <<  str << endl;
	str[pos-1] = '0';
	cin >> a;
	if(x == 1) {
		return a < v;
	} else return a == v;
}

int find(int x) {
	int i = 1;
	int f = n;
	int m;
	while(f > i) {
		m = (i+f)/2;
		if(check(m,x) == 1) {
			f = m;
		} else i = m+1;
	}
	return f;
}

int main() {

	cin >> n;

	str = string(n,'0');
	cout << "? " <<  str << endl;
	cin >> v;

	int r0,r1;
	if(check(1,0)) {
		r0 = 1;
		r1 = find(1);
	} else {
		r0 = find(0);
		r1 = 1;
	}

	cout << "! " << r0 << " " << r1 << endl;
	fflush(stdout);
	return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 1";
    for(i=1;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[1];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[0];
    if(wr[0]>wr[1]) f=1;
    else f=0;
    int l=0,r=n,mid,lt=wr[1],t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? ";
        for(i=0;i<mid;i++) std::cout<<"0";
        for(i=mid;i<r;i++) std::cout<<"1";
        for(i=r;i<n;i++) std::cout<<"0";
        std::cout<<std::endl;
        std::cin>>wr[t];
        if(f==0)
        {
            if(wr[t]-wr[t-1]<lt)
            {
                l=mid+1;
                lt=(wr[t]-wr[t-1])/2;
            }
            else
            {
                r=mid;
                lt-=(wr[t]-wr[t-1])/2;
            }

        }
        else
        {
            if(wr[t]-wr[t-1]<lt)
            {
                r=mid;
                lt-=(wr[t]-wr[t-1])/2;
            }
            else
            {
                l=mid+1;
                lt=(wr[t]-wr[t-1])/2;
            }
        }
        t++;
    }
    if(f==0) std::cout<<"! 1 "<<l<<std::endl;
    else std::cout<<"! "<<l<<" 1"<<std::endl;
    return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 1";
    for(i=1;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[1];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[0];
    if(wr[0]>wr[1])
    {
        f=1;
        wr[1]=n-wr[1];
    }
    else f=0;
    int l=0,r=n,mid,t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? ";
        if(f==0)
        {
            for(i=0;i<mid;i++) std::cout<<"0";
            for(i=mid;i<r;i++) std::cout<<"1";
            for(i=r;i<n;i++) std::cout<<"0";
        }
        else
        {
            for(i=0;i<mid;i++) std::cout<<"1";
            for(i=mid;i<r;i++) std::cout<<"0";
            for(i=r;i<n;i++) std::cout<<"1";
        }
        std::cout<<std::endl;
        std::cin>>wr[t];
        if(wr[t]<wr[t-1])
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
        t++;
    }
    if(f==0) std::cout<<"! 1 "<<l+1<<std::endl;
    else std::cout<<"! "<<l+1<<" 1"<<std::endl;
    return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 1";
    for(i=1;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[1];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[0];
    if(wr[0]>wr[1])
    {
        f=1;
        wr[1]=n-wr[1];
    }
    else f=0;
    int l=0,r=n,mid,t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? ";
        if(f==0)
        {
            for(i=0;i<mid;i++) std::cout<<"0";
            for(i=mid;i<r;i++) std::cout<<"1";
            for(i=r;i<n;i++) std::cout<<"0";
        }
        else
        {
            for(i=0;i<mid;i++) std::cout<<"1";
            for(i=mid;i<r;i++) std::cout<<"0";
            for(i=r;i<n;i++) std::cout<<"1";
        }
        std::cout<<std::endl;
        std::cin>>wr[t];
        if(wr[t]<wr[t-1])
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
        t++;
    }
    if(f==0) std::cout<<"! 1 "<<l<<std::endl;
    else std::cout<<"! "<<l<<" 1"<<std::endl;
    return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 1";
    for(i=1;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[1];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[0];
    if(wr[0]>wr[1]) f=1;
    else
    {
        wr[1]=n-wr[1];
        f=0;
    }
    int l=0,r=n,mid,t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? ";
        if(f==0)
        {
            for(i=0;i<mid;i++) std::cout<<"0";
            for(i=mid;i<r;i++) std::cout<<"1";
            for(i=r;i<n;i++) std::cout<<"0";
        }
        else
        {
            for(i=0;i<mid;i++) std::cout<<"1";
            for(i=mid;i<r;i++) std::cout<<"0";
            for(i=r;i<n;i++) std::cout<<"1";
        }
        std::cout<<std::endl;
        std::cin>>wr[t];
        if(wr[t]<=wr[t-1])
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
        t++;
    }
    if(f==0) std::cout<<"! 1 "<<l<<std::endl;
    else std::cout<<"! "<<l<<" 1"<<std::endl;
    return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 1";
    for(i=1;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[1];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"0";
    std::cout<<std::endl;
    std::cin>>wr[0];
    if(wr[0]>wr[1])
    {
        f=1;
        wr[1]=n-wr[1];
    }
    else f=0;
    int l=0,r=n,mid,t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? ";
        if(f==0)
        {
            for(i=0;i<mid;i++) std::cout<<"0";
            for(i=mid;i<r;i++) std::cout<<"1";
            for(i=r;i<n;i++) std::cout<<"0";
        }
        else
        {
            for(i=0;i<mid;i++) std::cout<<"1";
            for(i=mid;i<r;i++) std::cout<<"0";
            for(i=r;i<n;i++) std::cout<<"1";
        }
        std::cout<<std::endl;
        std::cin>>wr[t];
        if(wr[t]<=wr[t-1])
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
        t++;
    }
    if(f==0) std::cout<<"! 1 "<<l<<std::endl;
    else std::cout<<"! "<<l<<" 1"<<std::endl;
    return 0;
}


#include <iostream>

int wr[15];

int f;

main()
{
    std::ios_base::sync_with_stdio(false);
    int n;
    int i;
    std::cin>>n;
    std::cout<<"? 0";
    for(i=1;i<n;i++) std::cout<<"1";
    std::cout<<std::endl;
    std::cin>>wr[0];
    wr[0]=n-wr[0];
    std::cout<<"? ";
    for(i=0;i<n;i++) std::cout<<"1";
    std::cout<<std::endl;
    std::cin>>wr[1];
    wr[1]=n-wr[1];
    if(wr[0]>wr[1]) f=1;//f==0
    else f=-1;
    int l=0,r=n,mid,t=2;
    while(l<r)
    {
        mid=(l+r)/2;
        std::cout<<"? 1";
        for(i=1;i<mid;i++) std::cout<<"0";
        for(i=mid;i<n;i++) std::cout<<"1";
        std::cout<<std::endl;
        std::cin>>wr[t];
        wr[t]=n-wr[t];
        if((wr[t]-wr[1])*f==mid-1)
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
        t++;
    }
    if(f==-1) std::cout<<"! "<<l<<" 1"<<std::endl;
    else std::cout<<"! 1 "<<l<<std::endl;
    return 0;
}


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

const int N = 1003;

int n;
char s[N];

int a, b;

bool dfs(int l, int r, int base) {
  cout << "? " << s << endl;
  int x, len = r - l + 1;
  cin >> x;
  int y = x - base;

  if (abs(y) == len && base != -1) {
    if (y > 0) if (s[l] == '1') a = l; else b = l;
    else if (s[l] == '1') b = l; else a = l;
    return false;
  } else {
    int m = (l + r) / 2;
    if ((m - l + 1) % 2 == 0) {
      if (m + 1 == r) m--; else m++;
    }
    for (int i = l; i <= m; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    if (dfs(l, m, x)) return true;
    for (int i = l; i <= r; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    dfs(m + 1, r, x);
  }
  return true;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = '1';

  dfs(0, n - 1, -1);
  cout << "! " << a + 1 << " " << b + 1 << endl;

  return 0;
}


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

const int N = 1003;

int n;
char s[N];

int a, b;

bool dfs(int l, int r, int base) {
  cout << "? " << s << endl;
  int x, len = r - l + 1;
  cin >> x;
  int y = x - base;

  if (abs(y) == len && base != -1) {
    if (y > 0) if (s[l] == '1') a = l; else b = l;
    else if (s[l] == '1') b = l; else a = l;
    if (a >= 0 && b >= 0) return true; else return false;
  } else {
    int m = (l + r) / 2;
//    if ((m - l + 1) % 2 == 0) {
//      if (m + 1 == r) m--; else m++;
//    }
    for (int i = l; i <= m; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    if (dfs(l, m, x)) return true;
    for (int i = l; i <= r; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    dfs(m + 1, r, x);
  }
  return true;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = '1';

  a = -1, b = -1;
  dfs(0, n - 1, -1);
  cout << "! " << a + 1 << " " << b + 1 << endl;

  return 0;
}


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

const int N = 1003;

int n;
char s[N];

int main() {
  ios::sync_with_stdio(false);

  cin >> n;
  for (int i = 0; i < n; i++) {
    s[i] = '0';
  }
  s[n] = 0;
  cout << "? " << s << endl;

  int tot, tot1, tot2;
  cin >> tot;
  tot1 = 1;

  int lb = 1, ub = n;
  while (lb < ub) {
    int mid = lb + (ub - lb) / 2;
    cout << "? ";
    for (int i = 0; i < mid; i++) cout << '1';
    cout << s + mid << endl;

    cin >> tot2;
    if (abs(tot2 - tot) == mid) tot1 = tot2, lb = mid + 1;
    else ub = mid;
  }
//  cout << tot1 << endl;

  if (tot1 < tot) cout << "! " << lb << " " << lb - 1 << endl;
  else cout << "! " << lb - 1 << " " << lb << endl;

  return 0;
}


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

const int N = 1003;

int n;
char s[N];

int a, b;

bool dfs(int l, int r, int base) {
  cout << "? " << s << endl;
  int x, len = r - l + 1;
  cin >> x;
  int y = abs(base - x);

  if ((y == 0 || y == len) && base != -1) {
    if (s[l] == '1') b = l; else a = l;
    return false;
  } else {
    int m = (l + r) / 2;
    if ((m - l + 1) % 2 == 0) {
      if (m + 1 == r) m--; else m++;
    }
    for (int i = l; i <= m; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    if (dfs(l, m, x)) return true;
    for (int i = l; i <= r; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    dfs(m + 1, r, x);
  }
  return true;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = '1';

  dfs(0, n - 1, -1);
  cout << "! " << a + 1 << " " << b + 1 << endl;

  return 0;
}


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

const int N = 1003;

int n;
char s[N];

int a, b;

bool dfs(int l, int r, int base) {
  cout << "? " << s << endl;
  int x, len = r - l + 1;
  cin >> x;
  int y = abs(base - x);

  if (y == len && base != -1) {
    if (s[l] == '1') b = l; else a = l;
    return false;
  } else if (y == 0 && base != -1) {
    if (s[l] == '1') a = l; else b = l;
  } else {
    int m = (l + r) / 2;
    if ((m - l + 1) % 2 == 0) {
      if (m + 1 == r) m--; else m++;
    }
    for (int i = l; i <= m; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    if (dfs(l, m, x)) return true;
    for (int i = l; i <= r; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    dfs(m + 1, r, x);
  }
  return true;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = '1';

  dfs(0, n - 1, -1);
  cout << "! " << a << " " << b << endl;

  return 0;
}


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

const int N = 1003;

int n;
char s[N];

int a, b;

bool dfs(int l, int r, int base) {
  cout << "? " << s << endl;
  int x, len = r - l + 1;
  cin >> x;
  int y = abs(base - x);

  if (y == len && base != -1) {
    if (s[l] == '1') b = l; else a = l;
    return false;
  } else {
    int m = (l + r) / 2;
    if ((m - l + 1) % 2 == 0) {
      if (m + 1 == r) m--; else m++;
    }
    for (int i = l; i <= m; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    if (dfs(l, m, x)) return true;
    for (int i = l; i <= r; i++) {
      s[i] = (s[i] == '1' ? '0' : '1');
    }
    dfs(m + 1, r, x);
  }
  return true;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++) s[i] = '1';

  dfs(0, n - 1, -1);
  cout << "! " << a + 1 << " " << b + 1 << endl;

  return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n, nrFound, found = -1;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		fflush(stdout);
		exit(0);
	}

	cout << "? " << s << '\n';
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

int GetValues(int st, int end){

	if(nrFound == 2)	return 0;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		if(found != dist < mainDist || found == -1)
			pos[dist < mainDist] = st + 1,
			found = dist < mainDist,
			nrFound ++;

		return 1;
	}

	int mid = (st + end) / 2;

	int aux = GetValues(st, mid);
	if(nrFound == 2)	return 0;

	if(nrFound == 1 && aux && mid + 1 == end){

		nrFound ++;
		pos[!found] = end + 1;
		return 1;
	}

	GetValues(mid + 1, end);
	return 0;
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1] << '\n';
	fflush(stdout);
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		fflush(stdout);
		exit(0);
	}

	cout << "? " << s << '\n';
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

int GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return 2;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist] = st + 1;
		return dist < mainDist;
	}

	int mid = (st + end) / 2;

	int aux = GetValues(st, mid);
	if(aux >= 0 && aux <= 1 && mid + 1 == end)
		pos[!aux] = end + 1;
	else
		GetValues(mid + 1, end);

	return -1;
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1] << '\n';
	fflush(stdout);
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		exit(0);
	}

	cout << "? " << s;
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

void GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist ? 1 : 0] = st + 1;
		return;
	}

	int mid = (st + end) / 2;

	GetValues(st, mid);
	GetValues(mid + 1, end);
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1];
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0 << flush;
		exit(0);
	}

	cout << "? " << s << flush;

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

void GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist ? 1 : 0] = st + 1;
		return;
	}

	int mid = (st + end) / 2;

	GetValues(st, mid);
	GetValues(mid + 1, end);
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1] << flush;
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		exit(0);
	}

	cout << "? " << s;
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

void GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist ? 1 : 0] = st + 1;
		return;
	}

	int mid = (st + end) / 2;

	GetValues(st, mid);
	GetValues(mid + 1, end);
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1];
	fflush(stdout);
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n, nrFound, found = -1;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		fflush(stdout);
		exit(0);
	}

	cout << "? " << s << '\n';
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

int GetValues(int st, int end, int ask){

	if(nrFound == 2)	return 0;

	if(ask){

		int dist = Ask(BuildS(st, end));
		if(abs(dist - mainDist) == end - st + 1){
			if((dist < mainDist) != found){

				found = dist < mainDist,
				nrFound ++,
				pos[found] = st + 1;
			}

			if(found != -1)
                return 1;
        }
	}
	else
		if(st == end && nrFound == 1){

			nrFound ++;
			pos[!found] = st + 1;

			return 1;
		}

	int mid = (st + end) / 2;
	if(GetValues(st, mid, true))
		GetValues(mid + 1, end, false);
	else
		GetValues(mid + 1, end, true);

	return 0;
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, n - 1, false);

	cout << "! " << pos[0] << " " << pos[1] << '\n';
	fflush(stdout);
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		fflush(stdout);
		exit(0);
	}

	cout << "? " << s << '\n';
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

void GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist ? 1 : 0] = st + 1;
		return;
	}

	int mid = (st + end) / 2;

	GetValues(st, mid);
	GetValues(mid + 1, end);
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1] << '\n';
	fflush(stdout);
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

int mainDist, nrQ, n;
int pos[2];

int Ask(string s){

	nrQ ++;
	if(nrQ > 15){

		cout << 0;
		fflush(stdout);
		exit(0);
	}

	cout << "? " << s << '\n';
	fflush(stdout);

	int dist;
	cin >> dist;
	return dist;
}

string BuildS(int st, int end){

	string s = "";
	for(int i = 0; i < st; i ++)
		s += "0";
	for(int i = st; i <= end; i ++)
		s += "1";
	for(int i = end + 1; i < n; i ++)
		s += "0";

	return s;
}

int GetValues(int st, int end){

	if(pos[0] != 0 && pos[1] != 0)
		return 2;

	int dist = Ask(BuildS(st, end));
	if(abs(dist - mainDist) == end - st + 1){

		pos[dist < mainDist ? 1 : 0] = st + 1;
		return 1;
	}

	int mid = (st + end) / 2;

	if(GetValues(st, mid) == 1 && mid + 1 == end)
	{
		if(pos[0] == 0)	pos[0] = end + 1;
		else 			pos[1] = end + 1;
	}
	else
		GetValues(mid + 1, end);

	return 0;
}

int main(){

	cin >> n;

	string s = "";
	for(int i = 0; i < n; i ++)
		s += '0';

	mainDist = Ask(s);

	GetValues(0, (n - 1) / 2);
	GetValues((n - 1) / 2 + 1, n - 1);

	cout << "! " << pos[0] << " " << pos[1] << '\n';
	fflush(stdout);
	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
	int t; scanf("%d",&t); return t;
//	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)!=mid-l+1||(mid-l+1==1&&bef>tmp)) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	scanf("%d",&n); //n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
// 	int t; scanf("%d",&t); return t;
	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)==mid-l+1 && bef>tmp) return l;//注意等于区间长度时差值可能是不变的
		if(std::abs(bef-tmp)<mid-l+1) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1); fflush(stdout);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
	int t; scanf("%d",&t); return t;
//	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)==mid-l+1 && bef>tmp) return l;//注意等于区间长度时差值可能是不变的
		if(std::abs(bef-tmp)<mid-l+1) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	scanf("%d",&n); //n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1); fflush(stdout);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
	int t; scanf("%d",&t); return t;
//	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)==mid-l+1 && bef>tmp) return l;//注意等于区间长度时差值可能是不变的
		if(std::abs(bef-tmp)<mid-l+1) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	scanf("%d",&n); //n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
	return read();
//	int t; scanf("%d",&t); return t;
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)==mid-l+1 && bef>tmp) return l;//注意等于区间长度时差值可能是不变的
		if(std::abs(bef-tmp)<mid-l+1) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);// fflush(stdout);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	puts(s+1); fflush(stdout);
	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)!=mid-l+1||(mid-l+1==1&&bef>tmp)) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	scanf("%d",&n); //n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	putchar('?'), puts(s); fflush(stdout);
	int t; scanf("%d",&t); return t;
//	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)==mid-l+1 && bef>tmp) return l;//注意等于区间长度时差值可能是不变的
		if(std::abs(bef-tmp)<mid-l+1) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[0]=' ', s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1); fflush(stdout);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	puts(s+1); fflush(stdout);
	int t; scanf("%d",&t); return t;
//	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)!=mid-l+1||(mid-l+1==1&&bef>tmp)) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	scanf("%d",&n); //n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);

	return 0;
}


/*
$Description$
有一个长为$n$的二进制串，保证$01$都存在。你可以询问不超过$15$次，每次询问你给出一个长为$n$的二进制串，交互库会返回你的串和目标串的不同位的数目。求任意一个$0$和$1$的位置。
$n\leq 1000$。
$Solution$
通过$0...$和$1...$就可以判断出第一个数是什么。然后二分，对每个区间判断是否全为$0/1$，就可以找到另一个了。
*/
#include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define gc() getchar()
const int N=1005;

int n;
char s[N];

inline int read()
{
	int now=0;register char c=gc();
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);now=now*10+c-'0',c=gc());
	return now;
}
inline int Query()
{
	puts(s+1); fflush(stdout);
	return read();
}
inline void Fill(int l,int r,const char c)
{
	for(int i=l; i<=r; ++i) s[i]=c;
}
int Solve(const char q,const char std)
{
	for(int i=1; i<=n; ++i) s[i]=std;
	int l=2,r=n,mid,bef=Query(),tmp;
	while(l<r)
	{
		Fill(l,mid=l+r>>1,q), tmp=Query(), Fill(l,mid,std);
		if(std::abs(bef-tmp)!=mid-l+1||(mid-l+1==1&&bef>tmp)) r=mid;
		else l=mid+1;
	}
	return l;
}

int main()
{
	n=read();
	for(int i=1; i<=n; ++i) s[i]='0'; s[n+1]='\0';
	int t0=Query(); s[1]='1'; int t1=Query();
	int ans0, ans1;
	if(t0<t1) ans0=1, ans1=Solve('1','0');
	else ans1=1, ans0=Solve('0','1');
	printf("! %d %d\n",ans0,ans1);

	return 0;
}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham,req0=1,req1=1,an0,an1;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	int prHam=ham;
	int fl=1;
	while(1){
		if(r==l){
			if(req0)
				an0=l+1;
			else if(!req1) an1=l+1;
			pf("! %d %d\n",an0,an1);
			fflush(stdout);
			return 0;
		}
		int m=(l+r+1)/2;
		for(int i=m;i<=r;i++)
			if(!fl)
				s[i]='0';
			else s[i]='1';
		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==r-m+1){
			if(fl){
				req1=0;
				an1=m+1;
				r=m-1;
			}
			else{
				req0=0;
				an0=m+1;
				r=m-1;
			}
		}
		else{
			fl=!fl;
			l=m;
		}
		prHam=ham;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham,req0=1,req1=1,an0,an1;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	int prHam=ham;
	int fl=1;
	while(1){
		if(r==l){
			if(req0)
				an0=l+1;
			else if(req1) an1=l+1;
			pf("! %d %d\n",an0,an1);
			fflush(stdout);
			return 0;
		}
		int m=(l+r+1)/2;
		for(int i=m;i<=r;i++)
			if(!fl)
				s[i]='0';
			else s[i]='1';
		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==r-m+1){
			if(fl){
				if(ham<prHam){
					req1=0;
					an1=m+1;
				}
				else{
					req0=0;
					an0=m+1;
				}
				r=m-1;
			}
			else{
				if(ham<prHam){
					req0=0;
					an0=m+1;
				}
				else{
					req1=0;
					an1=m+1;
				}
				r=m-1;
			}
		}
		else{
			fl=!fl;
			l=m;
		}
		prHam=ham;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham,req0=1,req1=1,an0,an1;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	int prHam=ham;
	int fl=1;
	while(1){
		if(r==l){
			if(req0)
				an0=l+1;
			else if(req1) an1=l+1;
			pf("! %d %d\n",an0,an1);
			fflush(stdout);
			return 0;
		}
		int m=(l+r+1)/2;
		for(int i=m;i<=r;i++)
			if(!fl)
				s[i]='0';
			else s[i]='1';
		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==r-m+1){
			if(fl){
				req1=0;
				an1=m+1;
				r=m-1;
			}
			else{
				req0=0;
				an0=m+1;
				r=m-1;
			}
		}
		else{
			fl=!fl;
			l=m;
		}
		prHam=ham;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	int fl=0;
	while(1){
		int prHam=ham;
		if(r-l+1==2){
			if(s[l]=='0'){
				s[l]='1';
				s[l+1]='0';
			}
			else{
				s[l]='0';
				s[l+1]='1';
			}
			cout<<"? "<<s;
			line;
			fflush(stdout);
			cin>>ham;
			if(ham>prHam)
				if(s[l]=='1')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			else
				if(s[l]=='0')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			line;
			fflush(stdout);
			return 0;
		}
		int m=(l+r)/2;
		for(int i=m;i<=r;i++)
			if(!fl)
				s[i]='1';
			else s[i]='0';

		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==(r-m+1))
			r=m,fl=0;
		else l=m,fl=1;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham;
	cout<<"? "<<s;
	fflush(stdout);
	cin>>ham;
	while(1){
		int prHam=ham;
		if(r-l+1==2){
			if(s[l]=='0'){
				s[l]='1';
				s[l+1]='0';
			}
			else{
				s[l]='0';
				s[l+1]='1';
			}
			cout<<"? "<<s;
			fflush(stdout);
			cin>>ham;
			if(ham>prHam)
				if(s[l]=='1')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			else
				if(s[l]=='0')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);

			return 0;
		}
		int m=(l+r)/2;
		for(int i=m;i<r;i++)
			s[i]='1';

		cout<<"? "<<s;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==(r-m+1))
			r=m;
		else l=m;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham,req0=1,req1=1,an0,an1;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	int prHam=ham;
	int fl=1;
	while(1){
		if(r==l){
			if(req0)
				an0=l+1;
			else if(req1) an1=l+1;
			pf("! %d %d\n",an0,an1);
			fflush(stdout);
			return 0;
		}
		int m=(l+r+1)/2;
		for(int i=m;i<=r;i++)
			if(!fl)
				s[i]='0';
			else s[i]='1';
		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==r-m+1){
			if(fl){
				if(ham<prHam){
					req1=0;
					an1=m+1;
				}
				else{
					req0=0;
					an1=m+1;
				}
				r=m-1;
			}
			else{
				if(ham<prHam){
					req0=0;
					an0=m+1;
				}
				else{
					req1=0;
					an1=m+1;
				}
				r=m-1;
			}
		}
		else{
			fl=!fl;
			l=m;
		}
		prHam=ham;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham;
	cout<<"? "<<s;
	fflush(stdout);
	cin>>ham;
	while(1){
		int prHam=ham;
		if(r-l+1==2){
			if(s[l]=='0'){
				s[l]='1';
				s[l+1]='0';
			}
			else{
				s[l]='0';
				s[l+1]='1';
			}
			cout<<"? "<<s;
			fflush(stdout);
			cin>>ham;
			if(ham>prHam)
				if(s[l]=='1')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			else
				if(s[l]=='0')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			fflush(stdout);
			return 0;
		}
		int m=(l+r)/2;
		for(int i=m;i<r;i++)
			s[i]='1';

		cout<<"? "<<s;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==(r-m+1))
			r=m;
		else l=m;
	}

	return 0;
	}


#define ll long long
#define mod 1000000007LL
#define F(a,b,c) for(a=b;a<c;a++)
#define Fr(a,b,c) for(a=b;a>=c;a--)
#define pf printf
#define sfd(a) scanf("%d",&a)
#define sfdd(a,b) scanf("%d%d",&a,&b)
#define sfl(a) scanf("%lld",&a)
#define sfll(a,b) scanf("%lld%lld",&a,&b)
#define pfd(a) printf("%d",a)
#define pfl(a) printf("%lld",a)
#define sf scanf
#define line printf("\n")
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define let(x,a) __typeof(a) x(a)
#define forall(it,v) for(it=v.begin();it!=v.end();it++)
int main(){
	int n,l=0,r;
	sfd(n);
	r=n-1;
	string s;
	for( int i = 0; i<n;i++)
		s+='0';
	int ham;
	cout<<"? "<<s;
	line;
	fflush(stdout);
	cin>>ham;
	while(1){
		int prHam=ham;
		if(r-l+1==2){
			if(s[l]=='0'){
				s[l]='1';
				s[l+1]='0';
			}
			else{
				s[l]='0';
				s[l+1]='1';
			}
			cout<<"? "<<s;
			line;
			fflush(stdout);
			cin>>ham;
			if(ham>prHam)
				if(s[l]=='1')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			else
				if(s[l]=='0')
					pf("! %d %d",l+1,l+2);
				else pf("! %d %d",l+2,l+1);
			line;
			fflush(stdout);
			return 0;
		}
		int m=(l+r)/2;
		for(int i=m;i<r;i++)
			s[i]='1';

		cout<<"? "<<s;
		line;
		fflush(stdout);
		cin>>ham;
		if(abs(ham-prHam)==(r-m+1))
			r=m;
		else l=m;
	}

	return 0;
	}


#include <bits\stdc++.h>

using namespace std;
#define ll long long
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
int n;
void get(int & dif, string & s){
    cout << "? " << s << endl;
    fflush(stdout);
    cin >> dif;
}

int main(){
  // freopen("input.txt", "r", stdin);
    cin >> n;
    string s;
    s.resize(n);
    for(int i = 0; i < n; ++i){
        s[i] += '1';
    }
    int an1 = 0;
    get(an1, s);
    int an2 = 0;
    s[0] = '0';
    get(an2, s);
    int fir = 0;
    if(an1 < an2){
        fir = 1;
    }
    s[0] = fir + '0';
    for(int i = 1; i < n; ++i){
        s[i] = fir + '0';
    }
    int allnofi, partnofi;
    get(allnofi, s);
    int l = 1;
    int r = n - 1;
    while(l < r){
        int mid = (l + r) / 2;
        for(int i = l; i <= mid; ++i){
            s[i] = !fir + '0';
        }
        get(partnofi, s);
        int dif_fi_no_fi = partnofi - allnofi;
        int sum_fi_no_fi = mid - l + 1;
        int fi = (dif_fi_no_fi + sum_fi_no_fi) / 2;
        int nofi = mid - l + 1 - fi;
        if(nofi){
            r = mid;
        }
        else{
            l = mid + 1;
        }
        for(int i = l; i <= mid; ++i){
            s[i] = fir + '0';
        }
    }
    cout << "! ";
    if(fir == 0){
        cout << 1 << " " << l + 1 << endl;
    }
    else{
        cout << l + 1 << " " << 1 << endl;
    }
    fflush(stdout);
    return 0;
}


#include <bits\stdc++.h>

using namespace std;
#define ll long long
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
int n;
void get(int & dif, string & s){
    cout << "? " << s << endl;
    fflush(stdout);
    cin >> dif;
}

int main(){
  // freopen("input.txt", "r", stdin);
    cin >> n;
    string s;
    s.resize(n);
    for(int i = 0; i < n; ++i){
        s[i] = '1';
    }
    int an1 = 0;
    get(an1, s);
    int an2 = 0;
    s[0] = '0';
    get(an2, s);
    int fir = 0;
    if(an1 < an2){
        fir = 1;
    }
    s[0] = fir + '0';
    for(int i = 1; i < n; ++i){
        s[i] = fir + '0';
    }
    int allnofi, partnofi;
    get(allnofi, s);
    int l = 1;
    int r = n - 1;
    while(l < r){
        int mid = (l + r) / 2;
        for(int i = l; i <= mid; ++i){
            s[i] = !fir + '0';
        }
        get(partnofi, s);
        int dif_fi_no_fi = partnofi - allnofi;
        int sum_fi_no_fi = mid - l + 1;
        int fi = (dif_fi_no_fi + sum_fi_no_fi) / 2;
        int nofi = mid - l + 1 - fi;
        for(int i = l; i <= mid; ++i){
            s[i] = fir + '0';
        }
        if(nofi > 0){
            r = mid;
        }
        else{
            l = mid + 1;
        }

    }
    cout << "! ";
    if(fir == 0){
        cout << 1 << " " << l + 1 << endl;
    }
    else{
        cout << l + 1 << " " << 1 << endl;
    }
    fflush(stdout);
    return 0;
}


#include <bits\stdc++.h>

using namespace std;
#define ll long long
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
int n;
void get(int & dif, string & s){
    cout << "? " << s << endl;
    fflush(stdout);
    cin >> dif;
}

int main(){
  // freopen("input.txt", "r", stdin);
    cin >> n;
    string s;
    s.resize(n);
    for(int i = 0; i < n; ++i){
        s[i] = '1';
    }
    int an1 = 0;
    get(an1, s);
    int an2 = 0;
    s[0] = '0';
    get(an2, s);
    int fir = 0;
    if(an1 < an2){
        fir = 1;
    }
    s[0] = fir + '0';
    for(int i = 1; i < n; ++i){
        s[i] = fir + '0';
    }
    int allnofi, partnofi;
    get(allnofi, s);
    int l = 1;
    int r = n - 1;
    while(l < r){
        int mid = (l + r) / 2;
        for(int i = l; i <= mid; ++i){
            s[i] = !fir + '0';
        }
        get(partnofi, s);
        int dif_fi_no_fi = partnofi - allnofi;
        int sum_fi_no_fi = mid - l + 1;
        int fi = (dif_fi_no_fi + sum_fi_no_fi) / 2;
        int nofi = mid - l + 1 - fi;
        if(nofi > 0){
            r = mid;
        }
        else{
            l = mid + 1;
        }
        for(int i = l; i <= mid; ++i){
            s[i] = fir + '0';
        }
    }
    cout << "! ";
    if(fir == 0){
        cout << 1 << " " << l + 1 << endl;
    }
    else{
        cout << l + 1 << " " << 1 << endl;
    }
    fflush(stdout);
    return 0;
}


#include <bits\stdc++.h>

using namespace std;
#define ll long long
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
int n;
void get(int & dif, string & s){
    cout << "? " << s << endl;
    fflush(stdout);
    cin >> dif;
}

int main(){
  // freopen("input.txt", "r", stdin);
    cin >> n;
    string s;
    s.resize(n);
    for(int i = 0; i < n; ++i){
        s[i] += '1';
    }
    int an1 = 0;
    get(an1, s);
    int an2 = 0;
    s[0] = '0';
    get(an2, s);
    int fir = 0;
    if(an1 < an2){
        fir = 1;
    }
    s[0] = fir + '0';
    for(int i = 1; i < n; ++i){
        s[i] = fir + '0';
    }
    int allnofi, partnofi;
    get(allnofi, s);
    int l = 1;
    int r = n - 1;
    while(l < r){
        int mid = (l + r) / 2;
        for(int i = l; i <= mid; ++i){
            s[i] = !fir + '0';
        }
        get(partnofi, s);
        int dif_fi_no_fi = partnofi - allnofi;
        int sum_fi_no_fi = mid - l + 1;
        int fi = (dif_fi_no_fi + sum_fi_no_fi) / 2;
        int nofi = mid - l + 1 - fi;
        if(nofi){
            r = mid;
        }
        else{
            l = mid + 1;
        }
        for(int i = l; i <= mid; ++i){
            s[i] = fir + '0';
        }
    }
    cout << "! ";
    if(fir == 0){
        cout << 0 << " " << l << endl;
    }
    else{
        cout << l << " " << 0 << endl;
    }
    fflush(stdout);
    return 0;
}


#include <bits\stdc++.h>

using namespace std;
#define ll long long
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
int n;
void get(int & dif, string & s){
    cout << "? " << s;
    fflush(stdout);
    cin >> dif;
}

int main(){
  // freopen("input.txt", "r", stdin);
    cin >> n;
    string s;
    s.resize(n);
    for(int i = 0; i < n; ++i){
        s[i] += '1';
    }
    int an1 = 0;
    get(an1, s);
    int an2 = 0;
    s[0] = '0';
    get(an2, s);
    int fir = 0;
    if(an1 < an2){
        fir = 1;
    }
    s[0] = fir + '0';
    for(int i = 1; i < n; ++i){
        s[i] = fir + '0';
    }
    int allnofi, partnofi;
    get(allnofi, s);
    int l = 1;
    int r = n - 1;
    while(l < r){
        int mid = (l + r) / 2;
        for(int i = l; i <= mid; ++i){
            s[i] = !fir + '0';
        }
        get(partnofi, s);
        int dif_fi_no_fi = partnofi - allnofi;
        int sum_fi_no_fi = mid - l + 1;
        int fi = (dif_fi_no_fi + sum_fi_no_fi) / 2;
        int nofi = mid - l + 1 - fi;
        if(nofi){
            r = mid;
        }
        else{
            l = mid + 1;
        }
        for(int i = l; i <= mid; ++i){
            s[i] = fir + '0';
        }
    }
    cout << "! ";
    if(fir == 0){
        cout << 0 << " " << l << endl;
    }
    else{
        cout << l << " " << 0 << endl;
    }
    fflush(stdout);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define ll long long
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair
#define sz(s) (int)s.size()
#define all(s) s.begin(), s.end()
#define ok puts("ok");
#define whatis(x) cerr << #x << " = " << x << endl;
#define pause system("pause");
#define random (rand() ^ (rand() << 15))

const int N = (int)1e5 + 7;
const int inf = (int)1e9 + 7;

int n;

int ask(string s) {
  cout << "? " << s << '\n';
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}

string s;
int pos1, pos0;

main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    s.pb('1');
  }
  int ans1 = ask(s);
  s[0] = '0';
  int ans2 = ask(s);
  if (ans1 < ans2)
    pos1 = 1;
  else
    pos0 = 1;
  s[0] = '1';

  int l = 0;
  int r = n - 1;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    for (int i = 1; i <= mid; i++) {
      s[i] = '0';
    }
    ans2 = ask(s);
    if ((ans1 - ans2) * (pos1 ? 1 : -1) == mid) {
      r = mid;
    } else {
      l = mid;
    }
    for (int i = 1; i <= mid; i++) {
      s[i] = '1';
    }
  }
  if (!pos0) pos0 = r + 1;
  else pos1 = r + 1;
  printf("! %d %d", pos0, pos1);
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define ll long long
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair
#define sz(s) (int)s.size()
#define all(s) s.begin(), s.end()
#define ok puts("ok");
#define whatis(x) cerr << #x << " = " << x << endl;
#define pause system("pause");
#define random (rand() ^ (rand() << 15))

const int N = (int)1e5 + 7;
const int inf = (int)1e9 + 7;

int n;

int ask(string s) {
  cout << "? " << s << '\n';
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}

string s;
int pos1, pos0;

main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    s.pb('1');
  }
  int ans1 = ask(s);
  s[0] = '0';
  int ans2 = ask(s);
  if (ans1 < ans2)
    pos1 = 1;
  else
    pos0 = 1;
  s[0] = '1';

  int l = 0;
  int r = n;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    for (int i = 1; i <= mid; i++) {
      s[i] = '0';
    }
    ans2 = ask(s);
    if ((ans1 - ans2) * (pos1 ? 1 : -1) == mid) {
      r = mid;
    } else {
      l = mid;
    }
    for (int i = 1; i <= mid; i++) {
      s[i] = '1';
    }
  }
  if (!pos0) pos0 = r + 1;
  else pos1 = r + 1;
  printf("! %d %d", pos0, pos1);
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define ll long long
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair
#define sz(s) (int)s.size()
#define all(s) s.begin(), s.end()
#define ok puts("ok");
#define whatis(x) cerr << #x << " = " << x << endl;
#define pause system("pause");
#define random (rand() ^ (rand() << 15))

const int N = (int)1e5 + 7;
const int inf = (int)1e9 + 7;

int n;

int ask(string s) {
  cout << "? " << s << '\n';
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}

string s;
int pos1, pos0;

main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    s.pb('1');
  }
  int ans1 = ask(s);
  s[0] = '0';
  int ans2 = ask(s);
  if (ans1 < ans2)
    pos1 = 1;
  else
    pos0 = 1;
  s[0] = '1';

  int l = 0;
  int r = n - 1;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    for (int i = 1; i <= mid; i++) {
      s[i] = '0';
    }
    ans2 = ask(s);
    if ((ans1 - ans2) * (pos0 ? 1 : -1) == mid) {
      l = mid;
    } else {
      r = mid;
    }
    for (int i = 1; i <= mid; i++) {
      s[i] = '1';
    }
  }
  if (!pos0) pos0 = r + 1;
  else pos1 = r + 1;
  printf("! %d %d", pos0, pos1);
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define eb emplace_back
#define ll long long
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair
#define sz(s) (int)s.size()
#define all(s) s.begin(), s.end()
#define ok puts("ok");
#define whatis(x) cerr << #x << " = " << x << endl;
#define pause system("pause");
#define random (rand() ^ (rand() << 15))

const int N = (int)1e5 + 7;
const int inf = (int)1e9 + 7;

int n;

int ask(string s) {
  cout << "? " << s << '\n';
  fflush(stdout);
  int x;
  scanf("%d", &x);
  return x;
}

string s;
int pos1, pos0;

main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    s.pb('1');
  }
  int ans1 = ask(s);
  s[0] = '0';
  int ans2 = ask(s);
  if (ans1 < ans2)
    pos1 = 1;
  else
    pos0 = 1;
  s[0] = '1';

  int l = 0;
  int r = n - 1;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    for (int i = 1; i <= mid; i++) {
      s[i] = '0';
    }
    ans2 = ask(s);
    if ((ans1 - ans2) * (pos1 ? 1 : -1) == mid) {
      l = mid;
    } else {
      r = mid;
    }
    for (int i = 1; i <= mid; i++) {
      s[i] = '1';
    }
  }
  if (!pos0) pos0 = r;
  else pos1 = r;
  printf("! %d %d", pos0, pos1);
}