#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int cnt = 0;
  int n = s1.length();
  for (int i = 0; i < n; ++i) {
    if (s1[i] != s2[i]) ++cnt;
  }
  if (cnt % 2) {
    cout << "impossible\n";
    return 0;
  }
  int k = 0;
  for (int i = 0; i < n; ++i) {
    if (s1[i] != s2[i]) {
      if (k < cnt / 2)
        cout << s1[i];
      else
        cout << s2[i];
      ++k;
    } else
      cout << s1[i];
  }
  return 0;
}
