#include <bits/stdc++.h>
using namespace std;
int a[200009], n;
vector<int> f[4], ans;
bool ok(int x, int y) {
  int k = x + y;
  if (f[3].size() - x + f[1].size() >= k) {
    int use = k - (f[3].size() - x);
    if (use < 0) return false;
    int p = k + f[1].size() - use;
    if (p > n / 2 || p + f[0].size() < n / 2) return false;
    ans.clear();
    for (int j = use; j < f[1].size(); j++) {
      ans.push_back(f[1][j]);
    }
    for (int j = 0; j < x; j++) ans.push_back(f[3][j]);
    for (int j = 0; j < y; j++) ans.push_back(f[2][j]);
    while (ans.size() < n / 2) {
      ans.push_back(f[0].back());
      f[0].pop_back();
    }
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  string s1, s0;
  cin >> s0 >> s1;
  for (int i = 0; i < n; i++) {
    if (s0[i] == '1' && s1[i] == '1')
      f[3].push_back(i + 1);
    else if (s0[i] == '1' && s1[i] == '0')
      f[2].push_back(i + 1);
    else if (s0[i] == '0' && s1[i] == '1')
      f[1].push_back(i + 1);
    else
      f[0].push_back(i + 1);
  }
  bool fid = 0;
  for (int i = 0; i <= f[3].size(); i++) {
    for (int j = 0; j <= f[2].size(); j++) {
      if (ok(i, j)) {
        fid = 1;
        break;
      }
    }
  }
  if (fid) {
    for (int i : ans) cout << i << " ";
  } else {
    cout << -1;
  }
}
