#include <bits/stdc++.h>
int i;
int len, len2, distance;
char s[100001], t[100001], p[100001];
int calculateDistance(char *s, char *t) {
  int i, result = 0;
  for (i = 0; i < len; i++) {
    if (s[i] != t[i]) result++;
  }
  return result;
}
int main() {
  scanf("%s", s);
  scanf("%s", t);
  len = strlen(s);
  distance = calculateDistance(s, t);
  if (distance % 2 == 0) {
    for (i = 0; i < len; i++) {
      if (s[i] != t[i] && len2 < (distance / 2)) {
        printf("%c", t[i]);
        len2++;
      } else {
        printf("%c", s[i]);
      }
    }
  } else {
    for (i = 0; i < len; i++) {
      if (s[i] != t[i]) {
        p[i] = s[i];
      } else {
        p[i] = t[i];
      }
    }
    len2 = 0;
    for (i = 0; i < len; i++) {
      if (s[i] == t[i] && len2 <= distance) {
        len2++;
        p[i] = s[i] == '0' ? '1' : '0';
      }
    }
    if (len2 != distance) {
      printf("impossible");
    } else {
      printf("%s", p);
    }
  }
  return 0;
}
