#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
char s[MAXN], t[MAXN], ans[MAXN];
int main() {
  int i;
  while (scanf("%s", s) == 1) {
    scanf("%s", t);
    int n = strlen(s);
    int cnt = 0;
    for (i = 0; i < n; i++) {
      if (s[i] != t[i]) cnt++;
      ans[i] = s[i];
    }
    if (cnt & 1) {
      printf("impossible\n");
      continue;
    }
    int temp = 0;
    for (i = 0; i < n; i++) {
      if (s[i] != t[i]) {
        if (temp == 0)
          ans[i] = s[i];
        else
          ans[i] = t[i];
        temp ^= 1;
      }
    }
    ans[n] = '\0';
    printf("%s\n", ans);
  }
  return 0;
}
