#include <bits/stdc++.h>
using namespace std;
char aa[5005], cc[5005];
vector<int> pos[5];
int main() {
  int n;
  int A = 0, B = 0, C = 0, D = 0;
  int a = 0, b = 0, c = 0, d = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> cc[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> aa[i];
    if (aa[i] == '0') {
      if (cc[i] == '0') {
        A++;
        pos[0].push_back(i);
      } else {
        C++;
        pos[2].push_back(i);
      }
    } else {
      if (cc[i] == '0') {
        B++;
        pos[1].push_back(i);
      } else {
        D++;
        pos[3].push_back(i);
      }
    }
  }
  bool march;
  for (a = 0; a <= A; a++) {
    d = a + B + D - n / 2;
    if (d > D || d < 0) {
      continue;
    }
    march = false;
    for (b = 0; b <= B; b++) {
      c = n / 2 - a - b - d;
      if (c > C || c < 0) {
        continue;
      }
      if (c >= 0) {
        march = true;
        break;
      }
    }
    if (march) {
      break;
    }
  }
  if (!march) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < a; i++) {
    cout << pos[0][i] + 1 << " ";
  }
  for (int i = 0; i < b; i++) {
    cout << pos[1][i] + 1 << " ";
  }
  for (int i = 0; i < c; i++) {
    cout << pos[2][i] + 1 << " ";
  }
  for (int i = 0; i < d; i++) {
    cout << pos[3][i] + 1 << " ";
  }
  cout << endl;
  return 0;
}
