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