#include <bits/stdc++.h>
using namespace std;
int main() {
  int diff = 0;
  string S, T;
  cin >> S >> T;
  for (int i = 0; i < S.size(); i++)
    if (S[i] != T[i]) diff++;
  if (diff % 2 == 1) {
    printf("impossible\n");
    return 0;
  }
  diff /= 2;
  for (int i = 0; i < S.size(); i++)
    if (S[i] == T[i])
      printf("%c", S[i]);
    else if (diff) {
      printf("%c", S[i]);
      diff--;
    } else
      printf("%c", T[i]);
  return 0;
}
