#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 5e3 + 5;
const int INF = 1e9;
long long powmod(long long x, long long y) {
  long long t;
  for (t = 1; y; y >>= 1, x = x * x % mod)
    if (y & 1) t = t * x % mod;
  return t;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
int n;
string s1, s2;
struct node {
  int idx;
};
node p[4][maxn];
int cnt0, cnt1, cnt2, cnt3;
int main() {
  cin >> n >> s1 >> s2;
  for (int(i) = (0); (i) < (n); (i)++) {
    if (s1[i] == '0' && s2[i] == '1')
      p[1][cnt1++] = node{i};
    else if (s1[i] == '0' && s2[i] == '0')
      p[0][cnt0++] = node{i};
    else if (s1[i] == '1' && s2[i] == '0')
      p[2][cnt2++] = node{i};
    else if (s1[i] == '1' && s2[i] == '1')
      p[3][cnt3++] = node{i};
  }
  int flag = 1;
  for (int i = 0; i <= cnt2 && flag; i++)
    for (int j = 0; j <= cnt3 && flag; j++) {
      int tp1 = cnt2 - i, tp2 = cnt3 - j;
      int tp3 = i + j - tp2;
      if (tp3 < 0 || tp3 > cnt1) continue;
      tp3 = cnt1 - tp3;
      if (tp3 + i + j > n / 2) continue;
      int tp4 = n / 2 - i - j - tp3;
      if (tp4 > cnt0 || tp4 < 0) continue;
      flag = 0;
      for (int tp = 0; tp < i; tp++) cout << p[2][tp].idx + 1 << " ";
      for (int tp = 0; tp < j; tp++) cout << p[3][tp].idx + 1 << " ";
      for (int tp = 0; tp < tp3; tp++) cout << p[1][tp].idx + 1 << " ";
      for (int tp = 0; tp < tp4; tp++) cout << p[0][tp].idx + 1 << " ";
    }
  if (flag) puts("-1");
  return 0;
}
