#include <bits/stdc++.h>
using namespace std;
const int N = 100500;
int main() {
  srand(time(NULL));
  string s, t;
  cin >> s;
  cin >> t;
  int k = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) k++;
  }
  if (k % 2 == 1) cout << "impossible", exit(0);
  int y = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == t[i])
      cout << s[i];
    else if (y == 1) {
      cout << s[i];
      y = 0;
    } else {
      cout << t[i];
      y = 1;
    }
  }
  return 0;
}
