#include <bits/stdc++.h>
using namespace std;
char str[100010];
char cstr[100010];
char ans[100010];
int main() {
  while (cin >> str >> cstr) {
    int dif = 0;
    int len1 = strlen(str);
    for (int i = 0; i < len1; i++) {
      if (str[i] != cstr[i]) {
        dif++;
      }
    }
    if (dif % 2 == 1) {
      printf("impossible\n");
    } else {
      if (dif == 0) {
        cout << str << endl;
      } else {
        int cnt = 0;
        for (int i = 0; i < len1; i++) {
          if (str[i] == cstr[i]) {
            ans[i] = str[i];
          } else {
            if (cnt < dif / 2) {
              if (str[i] == '0') {
                ans[i] = '1';
              } else {
                ans[i] = '0';
              }
              cnt++;
            } else {
              ans[i] = str[i];
            }
          }
        }
        for (int i = 0; i < len1; i++) {
          cout << ans[i];
        }
        cout << endl;
      }
    }
  }
  return 0;
}
