#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
void testCase() {
  string s1, s2;
  cin >> s1 >> s2;
  if (s1.length() != s2.length()) {
    cout << "impossible" << endl;
  } else {
    int cnt = 0;
    for (int i = 0; i < s1.length(); i++) {
      if (s1[i] != s2[i]) cnt++;
    }
    if (cnt & 1) {
      cout << "impossible" << endl;
    } else {
      int k = 0;
      for (int i = 0; i < s1.length(); i++) {
        if (s1[i] != s2[i]) {
          if (k) {
            cout << s1[i];
          } else {
            cout << s2[i];
          }
          k ^= 1;
        } else {
          cout << s1[i];
        }
      }
      cout << endl;
    }
  }
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  testCase();
  return 0;
}
