#include <bits/stdc++.h>
using namespace std;
char str[123456], str2[123456];
int main() {
  cin >> str >> str2;
  int n = strlen(str);
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (str[i] != str2[i]) cnt++;
  }
  if (cnt & 1) {
    cout << "impossible" << endl;
  } else {
    int tt = 0;
    for (int i = 0; i < n; ++i) {
      if (str[i] == str2[i]) {
        cout << str[i];
      } else {
        if (tt >= 0) {
          cout << str[i];
          tt--;
        } else {
          cout << str2[i];
          tt++;
        }
      }
    }
  }
  return 0;
}
