#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
int n;
char a[maxn], c[maxn];
vector<int> ac, cl, bo, ze;
int main() {
  scanf("%d%s%s", &n, c + 1, a + 1);
  for (int i = 1; i <= n; i++) {
    if (c[i] == '1' && a[i] == '1') {
      bo.push_back(i);
    } else if (c[i] == '1' && a[i] == '0') {
      cl.push_back(i);
    } else if (c[i] == '0' && a[i] == '1') {
      ac.push_back(i);
    } else {
      ze.push_back(i);
    }
  }
  bool f = false;
  for (int i = 0; i <= cl.size(); i++) {
    for (int j = 0; j <= ac.size(); j++) {
      int x = 0, y = 0;
      x = i + (ac.size() - j);
      y = j + (cl.size() - i);
      int g = i, h = j;
      int dx = (h - g) + bo.size();
      if (dx % 2 == 1 || dx < 0) {
        continue;
      }
      g += dx / 2;
      x += dx / 2;
      h += bo.size() - dx / 2;
      y += bo.size() - dx / 2;
      if (g != h) {
        continue;
      }
      if (x > n / 2 || y > n / 2 || x + ze.size() < n / 2 ||
          y + ze.size() < n / 2)
        continue;
      if (dx / 2 > bo.size()) continue;
      f = true;
      for (int k = 0; k < i; k++) printf("%d ", cl[k]);
      for (int k = 0; k < (ac.size() - j); k++) printf("%d ", ac[k]);
      for (int k = 0; k < dx / 2; k++) printf("%d ", bo[k]);
      for (int k = 0; k < (n / 2 - x); k++) printf("%d ", ze[k]);
      return 0;
    }
  }
  if (!f) puts("-1");
  return 0;
}
