#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s;
  cin >> t;
  int cnt = 0;
  for (int i = 0; i < (int)s.size(); i++) cnt += (s[i] != t[i]);
  if (cnt % 2 == 1 || s.size() != t.size()) {
    puts("impossible");
    return 0;
  }
  string res = "";
  int rem = 1;
  int x = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == t[i])
      res.push_back(s[i]);
    else {
      if (rem) {
        res.push_back(t[i]);
      } else {
        res.push_back(s[i]);
      }
      rem ^= 1;
      x++;
    }
  }
  assert(x % 2 == 0);
  int S = 0, T = 0;
  for (int i = 0; i < (int)res.size(); i++) {
    S += (res[i] == s[i]);
    T += (res[i] == t[i]);
  }
  assert(S == T);
  cout << res << endl;
}
