#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  string ans = "";
  int dif = 0;
  bool flag = false;
  getline(cin, s);
  getline(cin, t);
  for (int i = 0; i < (int)s.length(); i++)
    if (s[i] != t[i]) dif++;
  if ((dif == (int)s.length() && dif % 2 != 0) || dif % 2 != 0)
    cout << "impossible" << endl;
  else {
    for (int i = 0; i < (int)s.length(); i++) {
      if (s[i] == t[i])
        ans += s[i];
      else {
        if (flag) {
          ans += s[i];
          flag = false;
        } else {
          ans += t[i];
          flag = true;
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
