#include <bits/stdc++.h>
using namespace std;
int n;
string answer(string a, string b) {
  string c = "";
  int flag = 0;
  int num = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) {
      c += a[i];
    } else {
      if (flag == 0) {
        c += a[i];
      } else {
        c += b[i];
      }
      num++;
      flag = (flag + 1) % 2;
    }
  }
  if (num % 2 != 0) {
    return "impossible";
  } else {
    return c;
  }
}
signed main() {
  string a, b;
  cin >> a >> b;
  if (a.size() != b.size()) {
    cout << "impossible" << endl;
    return 0;
  }
  n = a.size();
  cout << answer(a, b) << endl;
}
