#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, c;
  cin >> s >> c;
  vector<int> zz, zo, oz, oo, a;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0' && c[i] == '0') zz.push_back(i);
    if (s[i] == '1' && c[i] == '0') oz.push_back(i);
    if (s[i] == '0' && c[i] == '1') zo.push_back(i);
    if (s[i] == '1' && c[i] == '1') oo.push_back(i);
  }
  int sz = 0, so = 0, stz = 0, sto = 0;
  while (stz < zz.size() && sz < zo.size() && zz.size() % 2 == 1 &&
         zo.size() > oz.size()) {
    a.push_back(zo[sz]);
    sz++;
    stz++;
    break;
  }
  while (sto < oo.size() && sz < zo.size() && oo.size() % 2 == 1 &&
         zo.size() > oz.size()) {
    a.push_back(oo[sto]);
    sto++;
    sz++;
    break;
  }
  while (stz < zz.size() && so < oz.size() && (zz.size() - stz) % 2 == 1) {
    a.push_back(zz[stz]);
    stz++;
    so++;
    break;
  }
  while (sto < oo.size() && so < oz.size() && (oo.size() - sto) % 2 == 1) {
    a.push_back(oz[so]);
    so++;
    sto++;
    break;
  }
  while (sz < zo.size() && so < oz.size()) {
    a.push_back(zo[sz]);
    sz++;
    so++;
  }
  while (sz < zo.size()) {
    if (stz == zz.size() && sto == oo.size()) break;
    if (stz < zz.size() && (sto == oo.size() || (zz.size() - stz) % 2 == 1)) {
      a.push_back(zo[sz]);
      sz++;
      stz++;
    } else {
      a.push_back(oo[sto]);
      sto++;
      sz++;
    }
  }
  while (so < oz.size()) {
    if (stz == zz.size() && sto == oo.size()) break;
    if (stz < zz.size() && (sto == oo.size() || (zz.size() - stz) % 2 == 1)) {
      a.push_back(zz[stz]);
      stz++;
      so++;
    } else {
      a.push_back(oz[so]);
      so++;
      sto++;
    }
  }
  if ((oo.size() - sto) % 2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  if ((zz.size() - stz) % 2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  while (stz < zz.size()) {
    a.push_back(zz[stz]);
    stz += 2;
  }
  while (sto < oo.size()) {
    a.push_back(oo[sto]);
    sto += 2;
  }
  if (sz < zo.size() || so < oz.size()) {
    cout << -1 << endl;
    return 0;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] + 1 << " ";
  }
  return 0;
}
