#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  while (a > 0 && b > 0) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
void YES_NO(bool YES_NO, bool isExit = true) {
  if (YES_NO)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  if (isExit) {
    exit(0);
  }
}
void Yes_No(bool Yes_No, bool isExit = true) {
  if (Yes_No)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  if (isExit) {
    exit(0);
  }
}
void yes_no(bool yes_no, bool isExit = true) {
  if (yes_no)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  if (isExit) {
    exit(0);
  }
}
int main() {
  string s, t;
  cin >> s;
  cin >> t;
  int cnt = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != t[i]) {
      ++cnt;
    }
  }
  if (cnt % 2 == 1) {
    cout << "impossible" << endl;
    return 0;
  }
  cnt /= 2;
  string ans = s;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != t[i] && cnt) {
      ans[i] = t[i];
      --cnt;
    }
  }
  cout << ans << endl;
  return 0;
}
