#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const int INF = (int)1e9 + 7;
const int MOD = (int)1e9 + 7;
const double EPS = (double)1e-8;
int main() {
  string s, t, p;
  cin >> s >> t;
  vector<int> a;
  for (int i = 0; i < (int)s.size(); ++i)
    if (s[i] != t[i]) a.push_back(i);
  if (a.size() % 2) {
    cout << "impossible";
    return 0;
  }
  p = s;
  for (int i = 0; i < (int)a.size(); ++i)
    if (i % 2)
      p[a[i]] = s[a[i]];
    else
      p[a[i]] = t[a[i]];
  cout << p;
  return 0;
}
