#include <bits/stdc++.h>
using namespace std;
int main() {
  int koyta, cnt, i, j, k, dis, color[100005], length;
  char str[100005], str1[100005];
  gets(str);
  gets(str1);
  memset(color, 0, sizeof(color));
  length = strlen(str);
  cnt = 0;
  for (i = 0; i < length; i++) {
    if (str[i] == str1[i]) {
      continue;
    } else {
      color[i] = 1;
      cnt++;
    }
  }
  if (cnt % 2 == 1) {
    printf("impossible\n");
  } else {
    int korjo = 0;
    for (i = 0; i < length; i++) {
      if (color[i] == 1 && str[i] == '1' && korjo == 0) {
        korjo++;
        printf("1");
      } else if (color[i] == 1 && str[i] == '1' && korjo > 0) {
        korjo--;
        printf("0");
      } else if (color[i] == 1 && str[i] == '0' && korjo == 0) {
        printf("0");
        korjo++;
      } else if (color[i] == 1 && str[i] == '0' && korjo > 0) {
        printf("1");
        korjo--;
      } else if (color[i] == 0) {
        printf("%c", str[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
