#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926536;
int main() {
  string p, t;
  cin >> p >> t;
  int c = 0;
  for (int i = 0; i < t.length(); i++) {
    if (p[i] != t[i]) c++;
  }
  if (c % 2 == 1)
    cout << "impossible";
  else {
    string b;
    int n = c / 2, k = 0;
    for (int i = 0; i < t.length(); i++) {
      if (p[i] == t[i])
        b += p[i];
      else {
        if (k < n)
          b += p[i];
        else
          b += t[i];
        k++;
      }
    }
    cout << b;
  }
}
