#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string a, b;
  cin >> a >> b;
  long x = 0;
  for (long i = 0; a[i]; i++) x += (a[i] != b[i]);
  if (x % 2)
    cout << "impossible";
  else {
    for (long j = 0, i = 0; a[i]; i++) {
      if (a[i] == b[i])
        cout << a[i];
      else {
        if (j < x / 2)
          cout << a[i];
        else
          cout << b[i];
        j++;
      }
    }
  }
  return 0;
}
