#include <bits/stdc++.h>
using namespace std;
int main() {
  int p, q, i, a, b, c1 = 0, c2 = 0;
  string s1, s2, ans = "";
  cin >> s1 >> s2;
  for (i = 0; i < s1.length(); i++) {
    if (s1[i] == s2[i])
      ans += s1[i];
    else if (c1 == c2) {
      ans += s1[i];
      c1++;
    } else {
      ans += s2[i];
      c2++;
    }
  }
  if (c1 == c2)
    cout << ans;
  else
    cout << "impossible";
  return 0;
}
