#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s, t, p;
  cin >> s >> t;
  int sum = 0;
  bool one = false;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == t[i]) {
      p += s[i];
      sum++;
    } else {
      if (one) {
        p += s[i];
        one = !one;
      } else {
        p += t[i];
        one = !one;
      }
    }
  }
  if ((s.length() - sum) & 1)
    cout << "impossible";
  else
    cout << p;
  return 0;
}
