#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, h = 0, cnt = 0;
  string s, t;
  cin >> s;
  cin >> t;
  n = s.length();
  for (long long i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      h++;
    }
  }
  if (h % 2 == 0) {
    for (long long i = 0; i < n; i++) {
      if (s[i] == t[i]) {
        cout << s[i];
      } else {
        if (cnt < h / 2) {
          cout << s[i];
        } else {
          cout << t[i];
        }
        cnt++;
      }
    }
    cout << endl;
  } else {
    cout << "impossible" << endl;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
