#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 5005 + 5;
string s1, s2;
int a[N], b[N], n;
vector<int> A, B, C, D;
void print(int a, int b, int c, int d) {
  int tot1 = 0, tot2 = 0;
  tot1 = a + b;
  tot2 = A.size() - a + C.size() - c;
  if (tot1 == tot2) {
    for (int i = 0; i < a; i++) cout << A[i] << ' ';
    for (int i = 0; i < b; i++) cout << B[i] << ' ';
    for (int i = 0; i < c; i++) cout << C[i] << ' ';
    for (int i = 0; i < d; i++) cout << D[i] << ' ';
    exit(0);
  } else
    return;
}
int main() {
  cin >> n;
  cin >> s1 >> s2;
  for (int i = 1; i <= n; i++) {
    a[i] = s1[i - 1] - '0';
  }
  for (int i = 1; i <= n; i++) {
    b[i] = s2[i - 1] - '0';
    if (a[i] == 1) {
      if (b[i] == 1)
        A.push_back(i);
      else
        B.push_back(i);
    } else {
      if (b[i] == 1)
        C.push_back(i);
      else
        D.push_back(i);
    }
  }
  for (int i = 0; i <= A.size(); i++) {
    for (int j = 0; j <= B.size(); j++) {
      int c = A.size() + C.size() - 2 * i - j;
      if (c < 0 || c > C.size()) continue;
      int d = n / 2 - i - j - c;
      if (d >= 0 && d <= D.size()) {
        print(i, j, c, d);
      }
    }
  }
  cout << -1;
  return 0;
}
