#include <bits/stdc++.h>
using namespace std;
vector<long long> a, b, c, d;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  string s, t;
  cin >> n;
  cin >> s >> t;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '0' && t[i] == '0')
      a.push_back(i + 1);
    else if (s[i] == '1' && t[i] == '0')
      b.push_back(i + 1);
    else if (s[i] == '0' && t[i] == '1')
      c.push_back(i + 1);
    else
      d.push_back(i + 1);
  }
  for (long long i = 0; i <= b.size(); i++) {
    for (long long j = 0; j <= d.size(); j++) {
      long long s = (1 * c.size()) - i - 2 * j + (1 * d.size());
      if (s >= 0 && s <= c.size()) {
        long long z = i + j + s;
        long long k = n / 2 - z;
        if (k >= 0 && k <= a.size()) {
          for (long long l = 0; l < k; l++) cout << a[l] << " ";
          for (long long l = 0; l < i; l++) cout << b[l] << " ";
          for (long long l = 0; l < s; l++) cout << c[l] << " ";
          for (long long l = 0; l < j; l++) cout << d[l] << " ";
          return 0;
        }
      }
    }
  }
  cout << "-1\n";
}
