#include <bits/stdc++.h>
using namespace std;
int md = 1e9 + 7;
char c[100100], v[100100];
void solve() {
  int i, j, l, q, w, z, x, r, m, k = 0;
  gets(v);
  x = strlen(c);
  for (i = 0; i < x; i++)
    if (c[i] != v[i]) k++;
  if (k % 2 == 1) {
    printf("impossible\n");
    return;
  }
  k /= 2;
  for (i = 0; i < x; i++)
    if (c[i] == v[i])
      printf("%c", c[i]);
    else if (k > 0) {
      printf("%c", c[i]);
      k--;
    } else
      printf("%c", v[i]);
  printf("\n");
}
int main() {
#pragma comment(linker, "/STACK:1073741824")
  int n, m, k, i;
  while (gets(c)) solve();
  return 0;
}
