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