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