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