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