#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s, t;
  cin >> s >> t;
  n = s.length();
  char ss[n], tt[n];
  int positions[n];
  int count = 0;
  for (int i = 0; i < n; i++) {
    ss[i] = s.at(i);
    tt[i] = t.at(i);
    if (ss[i] != tt[i]) {
      positions[count] = i;
      count++;
    }
  }
  if (count % 2 != 0)
    cout << "impossible";
  else {
    for (int i = 0; i < count; i++) {
      if (i % 2 == 0) ss[positions[i]] = tt[positions[i]];
    }
    for (int i = 0; i < n; i++) cout << ss[i];
  }
  return 0;
}
