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