#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
}
const long double PI = acos(-1);
const long long MOD = 1000000000 + 7;
const int maxn = 1024;
int main() {
  fastio();
  string s, t;
  cin >> s;
  cin >> t;
  int n = s.size();
  int dif = 0;
  for (int i = 0; i < (int)n; ++i)
    if (s[i] != t[i]) dif++;
  if (dif % 2) {
    cout << "impossible"
         << "\n";
    return 0;
  }
  if (dif == 0) {
    cout << s << "\n";
    return 0;
  }
  dif /= 2;
  string ans(n, '$');
  for (int i = 0; i < (int)n; ++i) {
    if (s[i] != t[i] and dif > 0) {
      ans[i] = t[i];
      dif--;
    } else
      ans[i] = s[i];
  }
  cout << ans << "\n";
  return 0;
}
