#include <bits/stdc++.h>
using namespace std;
const long long N = 2 * 1e6;
const long double EPS = 1e-8;
const long long INF = 2 * 1e9 + 1;
const long long MAX = 1e9;
int w[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  srand(time(NULL));
  string s, t;
  cin >> s >> t;
  int qua = 0;
  for (int i = 0; i < s.size(); i++) qua += (s[i] != t[i]);
  if (qua % 2) {
    cout << "impossible";
    return 0;
  }
  qua /= 2;
  for (int i = 0; i < s.size(); i++)
    if (s[i] != t[i] && qua) s[i] = t[i], qua--;
  cout << s;
}
