#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[100005], t[100005];
  scanf("%s %s", s, t);
  int n = strlen(s);
  int ham = 0;
  for (int i = (0); i < (n); ++i) ham += s[i] != t[i];
  if (ham & 1)
    printf("impossible\n");
  else {
    int k = 0;
    for (int i = (0); i < (n); ++i)
      if (s[i] != t[i]) {
        if (k < (ham >> 1))
          printf("%c", s[i]);
        else
          printf("%c", t[i]);
        k++;
      } else
        printf("%c", s[i]);
    printf("\n");
  }
  return 0;
}
