#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int n, dist;
  cin >> s;
  cin >> t;
  n = s.length();
  dist = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      dist++;
    }
  }
  if (dist % 2) {
    cout << "impossible";
    return 0;
  }
  dist >>= 1;
  for (int i = 0; i < n; i++) {
    if ((s[i] != t[i]) && dist) {
      cout << s[i];
      dist--;
    } else {
      cout << t[i];
    }
  }
  return 0;
}
