#include <bits/stdc++.h>
using namespace std;
char s[100000 + 10];
char t[100000 + 10];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  cin >> t;
  int x, y = 0;
  x = strlen(s);
  for (int i = 0; i < x; i++) {
    if (s[i] != t[i]) y++;
  }
  if (y % 2)
    cout << "impossible" << endl;
  else {
    int z = 1;
    y /= 2;
    for (int i = 0; i < x; i++) {
      if (s[i] != t[i] && z <= y) t[i] = s[i], z++;
    }
    cout << t << endl;
  }
  return 0;
}
