#include <bits/stdc++.h>
using namespace std;
long long int INF = 1e9 + 5;
long long int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  string c, a;
  cin >> n >> c >> a;
  vector<long long int> clown, acro, both, none;
  for (long long int i = 0; i < n; i++) {
    if (c[i] == '1') {
      if (a[i] == '1') {
        both.push_back(i + 1);
      } else {
        clown.push_back(i + 1);
      }
    } else {
      if (a[i] == '1') {
        acro.push_back(i + 1);
      } else {
        none.push_back(i + 1);
      }
    }
  }
  for (long long int x = 0; x <= both.size(); x++) {
    for (long long int y = 0; y <= clown.size(); y++) {
      long long int z = (long long int)both.size() +
                        (long long int)acro.size() - 2 * x - y,
                    w = n / 2 - (x + y + z);
      if (z < 0 || w < 0 || z > acro.size() || w > none.size()) {
        continue;
      }
      while (x--) {
        cout << both[x] << " ";
      }
      while (y--) {
        cout << clown[y] << " ";
      }
      while (z--) {
        cout << acro[z] << " ";
      }
      while (w--) {
        cout << none[w] << " ";
      }
      cout << "\n";
      return 0;
    }
  }
  cout << -1 << "\n";
}
