#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  string ans;
  cin >> a >> b;
  int n = a.length();
  int k = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      k++;
    }
  }
  if (k % 2 == 1) {
    cout << "impossible" << endl;
    return 0;
  }
  bool add_a = true;
  bool add_b = false;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) {
      ans += a[i];
      continue;
    }
    if (add_a) {
      if (a[i] == '0') {
        ans += '1';
        add_a = false;
        add_b = true;
      }
      if (a[i] == '1') {
        ans += '0';
        add_a = false;
        add_b = true;
      }
      continue;
    }
    if (add_b) {
      if (b[i] == '0') {
        ans += '1';
        add_b = false;
        add_a = true;
      }
      if (b[i] == '1') {
        ans += '0';
        add_b = false;
        add_a = true;
      }
      continue;
    }
  }
  cout << ans << endl;
  return 0;
}
