#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  int n = s.size();
  vector<char> ans(n);
  vector<int> ind;
  for (int i = 0; i < n; i++)
    if (s[i] != t[i]) {
      ind.push_back(i);
    }
  if (ind.size() & 2 != 0)
    cout << "impossible";
  else {
    for (int i = 0; i < n; i++)
      if (s[i] == t[i]) ans[i] = t[i];
    for (int i = 0; i < ind.size() / 2; i++) {
      ans[ind[i]] = s[ind[i]];
    }
    for (int i = ind.size() / 2; i < ind.size(); i++) ans[ind[i]] = t[ind[i]];
    for (int i = 0; i < n; i++) {
      cout << ans[i];
    }
  }
  return 0;
}
