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