#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  string b;
  cin >> a;
  cin >> b;
  int n = a.size();
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) c++;
  }
  if (c % 2 == 1) {
    printf("impossible\n");
    return 0;
  }
  int m = 0;
  string ans = a;
  for (int i = 0; i < n; i++) {
    if (m == c / 2) break;
    if (a[i] != b[i]) {
      if (a[i] == '0')
        ans[i] = '1';
      else
        ans[i] = '0';
      m++;
    }
  }
  cout << ans << endl;
  return 0;
}
