#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, d;
  char s[100002], t[100002], u[100002];
  cin >> s >> t;
  n = strlen(s);
  d = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      d++;
    }
  }
  if (d % 2 == 1) {
    cout << "impossible" << endl;
  } else {
    d = d / 2;
    strcpy(u, s);
    for (int i = 0; i < n && d > 0; i++) {
      if (u[i] != t[i]) {
        d--;
        if (u[i] == '0')
          u[i] = '1';
        else
          u[i] = '0';
      }
    }
    cout << u << endl;
  }
  return 0;
}
