#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline istream& operator>>(istream& fin, pair<T1, T2>& pr) {
  fin >> pr.first >> pr.second;
  return fin;
}
template <class T0, class T1, class T2>
inline istream& operator>>(istream& fin, tuple<T0, T1, T2>& t) {
  fin >> get<0>(t) >> get<1>(t) >> get<2>(t);
  return fin;
}
template <class T>
inline istream& operator>>(istream& fin, vector<T>& a) {
  if (!a.size()) {
    size_t n;
    fin >> n;
    a.resize(n);
  }
  for (auto& u : a) fin >> u;
  return fin;
}
string probB() {
  vector<string> a(2);
  cin >> a;
  const auto n = a[0].length();
  size_t diff = 0;
  for (size_t i = 0; i < n; ++i) diff += a[0][i] != a[1][i];
  if (diff & 1) return "impossible";
  string str;
  size_t k = 0;
  for (size_t i = 0; i < n; ++i)
    if (a[0][i] == a[1][i])
      str.push_back(a[0][i]);
    else if (2 * k < diff)
      str.push_back(a[0][i]), ++k;
    else
      str.push_back(a[1][i]);
  return str;
}
int main(const int argc, char* argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout << probB();
  return EXIT_SUCCESS;
}
