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