#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e6;
long long power(long long a, long long b, long long m) {
  long long r = 1;
  while (b) {
    if (b % 2 == 1) r = (r * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return r;
}
bool prime[MAX];
void sieve(long long n) {
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++) {
    if (prime[p]) cout << p << " ";
  }
}
map<long long, long long> pfactors;
void pfact(long long n) {
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        pfactors[i]++;
        n /= i;
      }
    }
  }
  if (n > 1) pfactors[n]++;
  for (auto it : pfactors) {
    cout << it.first << " -> " << it.second << "\n";
  }
}
void solve() {
  string s, t;
  cin >> s >> t;
  long long n = s.length();
  long long cnt = 0;
  for (long long i = 0; i < n; ++i) {
    if (s[i] != t[i]) {
      cnt++;
    }
  }
  if (cnt % 2 == 1) {
    cout << "impossible";
    return;
  }
  long long nt = 0;
  for (long long i = 0; i < n; ++i) {
    if (s[i] == t[i]) {
      cout << s[i];
    } else if (nt < (cnt / 2)) {
      cout << s[i];
      nt++;
    } else {
      cout << t[i];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
