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