#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int LCD(int a, int b) { return (a * b) / GCD(a, b); }
int MyPow(int a, int b) {
  int res = 1;
  for (int i = (1); i <= (b); i++) res *= a;
  return res;
}
char c[100100];
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      cnt++;
    } else
      c[i] = b[i];
  }
  int t = 0;
  int f = 0;
  if (cnt % 2 == 1)
    cout << "impossible";
  else {
    for (int i = 0; i < n; i++) {
      if (a[i] != b[i]) {
        if (f == 0)
          c[i] = a[i];
        else
          c[i] = b[i];
        f ^= 1;
      }
    }
    for (int i = (0); i <= (n - 1); i++) cout << c[i];
  }
}
