#include <bits/stdc++.h>
using namespace std;
char s1[100002], s2[100002];
int diff[100002] = {0};
int main() {
  scanf("%s", s1);
  scanf("%s", s2);
  int i, len = strlen(s1), count = 0, temp;
  for (i = 0; i < len; i++) {
    if (s1[i] != s2[i]) {
      diff[i] = 1;
      count++;
    }
  }
  if (count & 1)
    cout << "impossible";
  else {
    temp = count >> 1;
    for (i = 0; i < len; i++) {
      printf("%c", s1[i]);
      if (s1[i] != s2[i]) temp--;
      if (temp == 0) break;
    }
    i++;
    for (; i < len; i++) printf("%c", s2[i]);
  }
  return 0;
}
