#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, ans;
  int i, flag;
  cin >> s1 >> s2;
  ans = s1;
  flag = 1;
  for (i = 0; i < s1.size(); i++) {
    if (s1[i] == s2[i])
      ans[i] = s1[i];
    else if (flag) {
      ans[i] = s1[i];
      flag = 0;
    } else {
      ans[i] = s2[i];
      flag = 1;
    }
  }
  if (flag)
    cout << ans;
  else
    cout << "impossible";
  return 0;
}
