#include <bits/stdc++.h>
using namespace std;
char s1[100005], s2[100005], s3[100005];
int main() {
  cin >> s1 >> s2;
  int len = (int)strlen(s1);
  int dif = 0;
  for (int i = 0; i < len; i++)
    if (s1[i] != s2[i]) dif++;
  if (dif % 2 != 0) {
    cout << "impossible" << endl;
    return 0;
  }
  int tmp = 0;
  for (int i = 0; i < len; i++) {
    if (tmp < dif / 2) {
      if (s1[i] != s2[i]) tmp++;
      s3[i] = s1[i];
    } else
      s3[i] = s2[i];
  }
  s3[len] = '\0';
  cout << s3 << endl;
}
