#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  long long int size = 0, count = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) {
      count++;
    }
  }
  long long int i = 0;
  size = s.size() / 2;
  if (count % 2 == 0) {
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == t[i]) {
        cout << s[i];
      } else {
        if (count != 0) {
          cout << s[i];
          count -= 2;
        } else {
          cout << t[i];
        }
      }
    }
  } else {
    cout << "impossible";
  }
}
