#include <bits/stdc++.h>
using namespace std;
long long int dp[101][101];
int main() {
  int m = 0;
  string s, t, f;
  vector<char> v;
  cin >> s >> t;
  ;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) m++;
  }
  if (m % 2) {
    cout << "impossible";
    return 0;
  }
  m = m / 2;
  int r = 0;
  ;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) {
      r++;
      if (r <= m)
        v.push_back(s[i]);
      else
        v.push_back(t[i]);
    } else
      v.push_back(s[i]);
  };
  for (int i = 0; i < v.size(); i++) cout << v[i];
}
