#include <bits/stdc++.h>
using namespace std;
vector<int> V[5];
int main() {
  int n;
  cin >> n;
  char c[5005], a[5005];
  scanf("%s%s", c, a);
  for (int i = 0; i < n; i++) {
    if (c[i] == '0' && a[i] == '0')
      V[0].push_back(i);
    else if (c[i] == '0' && a[i] == '1')
      V[1].push_back(i);
    else if (c[i] == '1' && a[i] == '0')
      V[2].push_back(i);
    else
      V[3].push_back(i);
  }
  bool f = 0;
  for (int k = 0; k <= V[2].size(); k++) {
    for (int s = 0; s <= V[3].size(); s++) {
      int j = V[1].size() + V[3].size() - 2 * s - k;
      if (j >= 0 && j <= V[1].size()) {
        int i = n / 2 - j - k - s;
        if (i >= 0 && i <= V[0].size()) {
          for (int t = 0; t < i; t++) printf("%d ", V[0][t] + 1);
          for (int t = 0; t < j; t++) printf("%d ", V[1][t] + 1);
          for (int t = 0; t < k; t++) printf("%d ", V[2][t] + 1);
          for (int t = 0; t < s; t++) printf("%d ", V[3][t] + 1);
          f = 1;
          break;
        }
      }
    }
    if (f) break;
  }
  if (!f) puts("-1");
}
