#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, s3;
  cin >> s1 >> s2;
  s3 = s1;
  long mark[100001] = {0}, count = 0;
  for (int i = 0; i < s1.length(); i++) {
    if (s2[i] == s1[i]) {
      mark[i] = 1;
    }
  }
  bool t = true;
  long x = 0, y = 0;
  for (int i = 0; i < s1.length(); i++) {
    if (mark[i] == 1) {
      s3[i] = s1[i];
      continue;
    }
    if (t) {
      s3[i] = s1[i] == '1' ? '1' : '0';
      t = false;
      x++;
    } else if (t == false) {
      s3[i] = s2[i] == '1' ? '1' : '0';
      t = true;
      y++;
    }
  }
  if (x != y)
    printf("impossible");
  else
    cout << s3;
}
