#include <bits/stdc++.h>
using namespace std;
char ar[100009];
char br[100009];
int main() {
  while (gets(ar)) {
    int n, i, j, cou, l;
    gets(br);
    l = strlen(ar), cou = 0;
    for (i = 0; i < l; i++) {
      if (ar[i] != br[i]) cou++;
    }
    if (cou % 2 != 0)
      printf("impossible\n");
    else {
      int cou2 = 0, nw = cou / 2;
      for (i = 0; i < l; i++) {
        if (nw > cou2 && ar[i] != br[i]) {
          cou2++;
          if (ar[i] == '0')
            printf("%c", '1');
          else
            printf("%c", '0');
        } else
          printf("%c", ar[i]);
      }
      printf("\n");
    }
  }
  return 0;
}
