#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s, t, p = "";
  cin >> s >> t;
  int n = s.size();
  int c = 0;
  for (int i = 0; i < n; i++)
    if (s[i] != t[i]) c++;
  if (c % 2) {
    cout << "impossible";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == t[i]) {
      p += s[i];
      continue;
    }
    if (c)
      p += s[i], c -= 2;
    else
      p += t[i];
  }
  cout << p << endl;
  return 0;
}
