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