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