#include <bits/stdc++.h>
using namespace std;
string c, a;
int main() {
  int n;
  int acr = 0, cl = 0, both = 0, no = 0;
  cin >> n;
  cin >> c >> a;
  for (int i = 0; i < n; i++) {
    if (a[i] == '1' && c[i] == '1') {
      both++;
    } else if (a[i] == '1') {
      acr++;
    } else if (c[i] == '1') {
      cl++;
    } else {
      no++;
    }
  }
  bool possible = false;
  int fa = 0, fc = 0, fb = 0, fn = 0;
  for (fc = 0; fc <= cl; fc++) {
    for (fa = 0; fa <= acr; fa++) {
      int v1 = fc + fa;
      int v2 = acr + both - v1;
      int v3 = n - acr - both - v1;
      if (v2 % 2 == 0 && v3 % 2 == 0) {
        fb = v2 / 2;
        fn = v3 / 2;
        if (fn >= 0 && fn <= no && fb >= 0 && fb <= both) {
          possible = true;
          break;
        }
      }
    }
    if (possible) {
      break;
    }
  }
  if (!possible) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == '1' && c[i] == '1') {
      if (fb > 0) {
        fb--;
        cout << i + 1 << " ";
      }
    } else if (a[i] == '1' && c[i] == '0') {
      if (fa > 0) {
        fa--;
        cout << i + 1 << " ";
      }
    } else if (a[i] == '0' && c[i] == '1') {
      if (fc > 0) {
        fc--;
        cout << i + 1 << " ";
      }
    } else {
      if (fn > 0) {
        fn--;
        cout << i + 1 << " ";
      }
    }
  }
  cout << endl;
  return 0;
}
