#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  string str, str1, str2 = "";
  long long int dist;
  bool flag, flag1;
  cin >> str >> str1;
  dist = 0;
  flag = flag1 = 0;
  long long int len = str.length();
  for (int i = 0; i < len; ++i) {
    if (str[i] != str1[i]) dist++;
  }
  if (dist % 2 != 0)
    cout << "impossible" << endl;
  else {
    for (int i = 0; i < len; ++i) {
      if (str[i] == str1[i])
        str2 += str[i];
      else if (flag == 0) {
        str2 += str[i];
        flag1 = 0;
        flag = 1;
      } else if (flag1 == 0) {
        str2 += str1[i];
        flag1 = 1;
        flag = 0;
      }
    }
    cout << str2 << endl;
  }
  str2 = "";
  return 0;
}
