#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string str1, str2;
  cin >> str1 >> str2;
  int diffcount = 0;
  for (int i = 0; i < str1.length(); i++) {
    if (str1[i] != str2[i]) diffcount++;
  }
  if (diffcount % 2 == 1) {
    cout << "impossible";
    return 0;
  }
  int index = 0;
  int toreach = diffcount / 2;
  while (diffcount != toreach) {
    if (str1[index] != str2[index]) {
      if (str1[index] == '1')
        str1[index] = '0';
      else
        str1[index] = '1';
      diffcount--;
    }
    index++;
  }
  cout << str1;
}
