#include <bits/stdc++.h>
using namespace std;
string s, t;
string tmp = "";
int main() {
  ios_base::sync_with_stdio(false);
  cin >> s >> t;
  long long res = 0;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] != t[i]) ++res;
  if (res % 2 == 1) {
    cout << "impossible";
  } else {
    res = res / 2;
    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == t[i])
        tmp = tmp + s[i];
      else {
        if (res > 0) {
          tmp = tmp + s[i];
          --res;
        } else
          tmp = tmp + t[i];
      }
    }
  }
  cout << tmp;
}
