#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using pii = pair<int, int>;
int query(string s) {
  (cout << "? " << s << '\n').flush();
  int dist;
  cin >> dist;
  return dist;
}
void printAns(int pos0, int pos1) {
  (cout << "! " << pos0 + 1 << ' ' << pos1 + 1 << '\n').flush();
}
int bsearch(int n, int c) {
  int d;
  char charTofind = '0' + c;
  char otherChar = (charTofind == '0' ? '1' : '0');
  int l, r, mid;
  string s;
  for (int i = 0; i < n; ++i) s.push_back(otherChar);
  d = query(s);
  for (l = 1, r = n; l < r;) {
    int mid = (l + r) / 2;
    for (int i = l; i <= mid; ++i) s[i] = charTofind;
    if (query(s) == d + (mid - l + 1))
      l = mid + 1;
    else
      r = mid;
    for (int i = 0; i < n; ++i) s[i] = otherChar;
  }
  return l;
}
int main() {
  int i, n, d0, d1, pos0, pos1;
  string s;
  pos0 = pos1 = -1;
  cin >> n;
  for (s.clear(), i = 0; i < n; ++i) s.push_back('0');
  d0 = query(s);
  for (s.clear(), i = 0; i < n; ++i) s.push_back(i == 0 ? '1' : '0');
  d1 = query(s);
  if (d0 < d1)
    pos0 = 0, pos1 = bsearch(n, 1);
  else
    pos1 = 0, pos0 = bsearch(n, 0);
  printAns(pos0, pos1);
  return 0;
}
