#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int arr1[5005], arr2[5005], arr3[5005], arr4[5005];
  memset(arr1, 0, sizeof(arr1));
  memset(arr2, 0, sizeof(arr2));
  memset(arr3, 0, sizeof(arr3));
  memset(arr4, 0, sizeof(arr4));
  cin >> n;
  string str1, str2;
  cin >> str1 >> str2;
  for (int i = 0; i < str1.length(); i++) {
    if (str1[i] == '0' && str2[i] == '0') {
      arr1[0]++;
      arr1[arr1[0]] = i + 1;
    }
    if (str1[i] == '0' && str2[i] == '1') {
      arr2[0]++;
      arr2[arr2[0]] = i + 1;
    }
    if (str1[i] == '1' && str2[i] == '0') {
      arr3[0]++;
      arr3[arr3[0]] = i + 1;
    }
    if (str1[i] == '1' && str2[i] == '1') {
      arr4[0]++;
      arr4[arr4[0]] = i + 1;
    }
  }
  int a1, b1, c1, d1, flag = 0;
  for (int i = 0; i <= arr1[0]; i++) {
    for (int j = 0; j <= arr2[0]; j++) {
      int c, d;
      c = str1.length() - 2 * i - j - arr2[0] - arr4[0];
      d = arr2[0] + arr4[0] - str1.length() / 2 + i;
      if ((c >= 0 && c <= arr3[0]) && (d >= 0 && d <= arr4[0])) {
        flag = 1;
        a1 = i;
        b1 = j;
        c1 = c;
        d1 = d;
        break;
      }
    }
    if (flag == 1) {
      break;
    }
  }
  if (flag) {
    for (int i = 1; i <= a1; i++) {
      cout << arr1[i] << " ";
    }
    for (int i = 1; i <= b1; i++) {
      cout << arr2[i] << " ";
    }
    for (int i = 1; i <= c1; i++) {
      cout << arr3[i] << " ";
    }
    for (int i = 1; i <= d1; i++) {
      cout << arr4[i] << " ";
    }
  } else {
    cout << "-1";
  }
}
