#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[100010], s2[100010];
  int a = 0;
  scanf("%s%s", s1, s2);
  int l = strlen(s1);
  for (int i = 0; i < l; i++)
    if (s1[i] != s2[i]) a++;
  if (a % 2 == 0) {
    a /= 2;
    int i = l - 1;
    while ((a > 0) && (i >= 0)) {
      i--;
      if (s1[i] != s2[i]) {
        s1[i] = s2[i];
        a--;
      }
    }
    cout << s1 << endl;
  } else
    cout << "impossible";
  return 0;
}
