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