#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int difs = 0;
  for (int ctr1 = 0; ctr1 < a.length(); ctr1++) {
    difs += !(a[ctr1] == b[ctr1]);
  }
  if (difs % 2 == 1) {
    cout << "impossible";
    return 0;
  }
  int ctr0 = 0;
  string rez;
  for (int ctr1 = 0; ctr1 < a.length(); ctr1++) {
    if (a[ctr1] == b[ctr1])
      rez += a[ctr1];
    else {
      if (ctr0 < difs / 2)
        rez += a[ctr1];
      else
        rez += b[ctr1];
      ctr0++;
    }
  }
  cout << rez;
  return 0;
}
