#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b, ans;
  cin >> a >> b;
  bool def[a.size()];
  long long d = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == b[i]) {
      def[i] = 0;
    } else {
      def[i] = 1;
      d++;
    }
  }
  if (d % 2)
    cout << "impossible";
  else {
    int t = d / 2;
    ans = "";
    for (int i = 0; i < a.size(); i++) {
      if (def[i]) {
        if (t) {
          ans = ans + a[i];
          t--;
        } else {
          ans = ans + b[i];
        }
      } else {
        ans = ans + a[i];
      }
    }
  }
  cout << ans << endl;
  return 0;
}
