#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b, str;
  int n, cont = 0, ca = 0, cb = 0;
  cin >> a >> b;
  n = a.size();
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) cont++;
  }
  if (cont % 2 == 0) {
    for (int i = 0; i < n; i++) {
      if (a[i] != b[i]) {
        if (ca > cb)
          cb++, str += b[i];
        else
          ca++, str += a[i];
      } else
        str += a[i];
    }
    cout << str << endl;
  } else
    printf("impossible\n");
}
