#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  int distance = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != t[i]) ++distance;
  }
  if (distance & 1) {
    cout << "impossible\n";
  } else {
    int diff = distance / 2;
    string equi = t;
    for (int i = 0; i < equi.size(); ++i) {
      if (!diff) {
        break;
      }
      if (s[i] != t[i]) {
        equi[i] = s[i];
        --diff;
      }
    }
    cout << equi << "\n";
  }
  return 0;
}
