#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:500000000")
using namespace std;
char a[100009], b[100009];
int main() {
  scanf("%s %s", a, b);
  int n = strlen(a), i, cnt = 0;
  for (i = 0; i < n; i++) cnt += a[i] != b[i];
  if (cnt & 1) {
    puts("impossible");
    return 0;
  }
  cnt /= 2;
  for (i = 0; i < n && cnt; i++) {
    if (a[i] != b[i]) {
      a[i] ^= 1;
      cnt--;
    }
  }
  puts(a);
}
