#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1);
const int inf = 0x3f3f3f3f;
int main() {
  int n;
  cin >> n;
  string j;
  string a;
  cin >> j >> a;
  int ac = 0, jo = 0, bo = 0, no = 0;
  for (int i = 0; i < n; ++i) {
    if (j[i] == '0' && a[i] == '0') no++;
    if (j[i] == '1' && a[i] == '0') jo++;
    if (j[i] == '1' && a[i] == '1') bo++;
    if (j[i] == '0' && a[i] == '1') ac++;
  }
  int ansac = -1;
  int ansjo = -1;
  int ansbo = -1;
  int ansno = -1;
  int to = n / 2;
  int po = ac + bo - to;
  vector<pair<int, int>> ans;
  map<int, int> m;
  for (int i = 0; i <= bo; i++) {
    for (int j = 0; j <= no; j++) {
      if (i - j == po) ans.push_back(make_pair(i, j));
      m[i + j] = 1;
    }
  }
  if (ans.size() == 0) {
    cout << -1 << endl;
    exit(0);
  }
  vector<pair<int, int>> ans2;
  for (int i = 0; i <= ac; i++) {
    for (int j = 0; j <= jo; j++) {
      if (m[to - i - j] == 1) {
        ans2.push_back(make_pair(i, j));
      }
    }
  }
  if (ans.size() == 0 || ans2.size() == 0) {
    cout << -1;
    exit(0);
  }
  int len = ans.size();
  int len2 = ans2.size();
  for (int i = 0; i < len; ++i) {
    for (int j = 0; j < len2; ++j) {
      if (ans2[j].second + ans[i].first ==
          (ac - ans2[j].first) + (bo - ans[i].first)) {
        ansjo = ans2[j].second;
        ansac = ans2[j].first;
        ansbo = ans[i].first;
        ansno = ans[i].second;
        break;
      }
    }
  }
  if (ansjo == -1 || ansac == -1 || ansbo == -1 || ansno == -1) {
    cout << -1;
    exit(0);
  }
  for (int i = 0; i < n; ++i) {
    if (ansbo > 0 && a[i] == '1' && j[i] == '1') {
      cout << i + 1;
      ansbo--;
      cout << " ";
    }
    if (ansno > 0 && a[i] == '0' && j[i] == '0') {
      cout << i + 1;
      ansno--;
      cout << " ";
    }
    if (ansjo > 0 && a[i] == '0' && j[i] == '1') {
      cout << i + 1;
      ansjo--;
      cout << " ";
    }
    if (ansac > 0 && a[i] == '1' && j[i] == '0') {
      cout << i + 1;
      ansac--;
      cout << " ";
    }
  }
  return 0;
}
