#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)(1e3 + 1e1);
const double PI = acos(-1.0);
string s, t, r;
long long n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> s >> t;
  for (int i = 0; i <= (int)(s.length()) - 1; i++) {
    if (s[i] == t[i])
      r += s[i];
    else
      r += 'l', n++;
  }
  if (n % 2 == 1) {
    cout << "impossible";
    return 0;
  }
  for (int i = 0; i <= (int)(s.length()) - 1; i++) {
    if (r[i] == 'l') {
      if (n % 2 == 0)
        r[i] = s[i];
      else
        r[i] = t[i];
      n--;
    }
  }
  cout << r;
  return 0;
}
