#include <bits/stdc++.h>
using namespace std;
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  vector<char> N1, N2;
  int i, j;
  int count1 = 0;
  for (i = 0; i < str1.size(); i++) {
    if (str1[i] != str2[i]) {
      N1.push_back(str1[i]);
      N2.push_back(str2[i]);
      count1 += 1;
    }
  }
  if (count1 % 2 != 0)
    cout << "impossible" << '\n';
  else {
    int count2 = 0;
    for (i = 0; i < str1.size(); i++) {
      if (str1[i] == str2[i])
        cout << str1[i];
      else {
        count2 += 1;
        if (count2 <= (N1.size() / 2))
          cout << N1[count2 - 1];
        else
          cout << N2[count2 - 1];
      }
    }
  }
}
