#include <bits/stdc++.h>
using namespace std;
int n;
string ina, inb;
vector<int> x[10];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> ina >> inb;
  for (int i = 0; i < n; i++) {
    if (ina[i] == '0') {
      if (inb[i] == '0') {
        x[1].push_back(i + 1);
      } else {
        x[2].push_back(i + 1);
      }
    } else {
      if (inb[i] == '0') {
        x[3].push_back(i + 1);
      } else {
        x[4].push_back(i + 1);
      }
    }
  }
  for (int b = 0; b <= x[2].size(); b++) {
    for (int c = 0; c <= x[3].size(); c++) {
      int d = (int)x[2].size() - b + (int)x[4].size() - c;
      if (d % 2 == 1) continue;
      d /= 2;
      int a = n / 2 - b - c - d;
      if (a < 0) continue;
      if (a > x[1].size() || b > x[2].size() || c > x[3].size() ||
          d > x[4].size())
        continue;
      for (int i = 0; i < a; i++) {
        cout << x[1][i] << " ";
      }
      for (int i = 0; i < b; i++) {
        cout << x[2][i] << " ";
      }
      for (int i = 0; i < c; i++) {
        cout << x[3][i] << " ";
      }
      for (int i = 0; i < d; i++) {
        cout << x[4][i] << " ";
      }
      cout << "\n";
      return 0;
    }
  }
  cout << -1 << "\n";
}
