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