#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, count = 0, down, j;
  string s, t, u = "";
  cin >> s >> t;
  l = s.size();
  for (int i = 0; i < l; i++) {
    if (s[i] != t[i]) count++;
  }
  if (count % 2 == 0) {
    down = count / 2;
    for (int j = 0; j < l; j++) {
      if (s[j] == t[j])
        u += s[j];
      else {
        if (down > 0) {
          u += t[j];
          down--;
        } else
          u += s[j];
      }
    }
    cout << u << endl;
  } else
    cout << "impossible" << endl;
  return 0;
}
