#include <bits/stdc++.h>
using namespace std;
mt19937 ran(time(0));
int mod = 1e9 + 7;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int Bpow(int a, int s) {
  if (s == 0) {
    return 1;
  }
  long long u = Bpow(a, s / 2);
  if (s & 1)
    return u * u % mod * a % mod;
  else
    return u * u % mod;
}
int main() {
  int n;
  cin >> n;
  vector<int> c(n);
  int cl = 0, ak = 0;
  for (int i = 0; i < n; i++) {
    char a;
    cin >> a;
    c[i] = a - '0';
    if (c[i]) cl++;
  }
  vector<int> a(n);
  vector<vector<vector<int>>> k(2, vector<vector<int>>(2));
  for (int i = 0; i < n; i++) {
    char ch;
    cin >> ch;
    a[i] = ch - '0';
    if (a[i]) ak++;
    k[c[i]][a[i]].push_back(i + 1);
  }
  for (int i = 0; i <= n / 2; i++) {
    if (i > cl) break;
    int nak = ak - i;
    if (nak < 0) break;
    if (nak > n / 2) continue;
    for (int j = 0; j <= min(i, nak); j++) {
      int vak = nak - j;
      int nc = i - j;
      int nn = n / 2 - i - vak;
      if (nn <= k[0][0].size() && vak <= k[0][1].size() &&
          nc <= k[1][0].size() && j <= k[1][1].size()) {
        for (int i = 0; i < nn; i++) {
          cout << k[0][0][i] << " ";
        }
        for (int i = 0; i < vak; i++) {
          cout << k[0][1][i] << " ";
        }
        for (int i = 0; i < nc; i++) {
          cout << k[1][0][i] << " ";
        }
        for (int i = 0; i < j; i++) {
          cout << k[1][1][i] << " ";
        }
        return 0;
      }
    }
  }
  cout << "-1";
}
