#include <bits/stdc++.h>
using namespace std;
int hammingDistanceOf(string first, string second);
string equiDistantString(string first, string second);
int main() {
  string first, second;
  cin >> first >> second;
  int hammindDistance = hammingDistanceOf(first, second);
  if (hammindDistance % 2 == 0) {
    cout << equiDistantString(first, second) << endl;
  } else {
    cout << "impossible" << endl;
  }
  return 0;
}
int hammingDistanceOf(string first, string second) {
  int distance = 0;
  for (int i = 0; i < first.size(); i++) {
    if (first.at(i) != second.at(i)) {
      distance++;
    }
  }
  return distance;
}
string equiDistantString(string first, string second) {
  int hammingDistance = hammingDistanceOf(first, second);
  int equiDistance = hammingDistance / 2;
  string equiDistantStr = first;
  int distanceFromFirst = 0;
  for (int i = 0; i < first.size(); i++) {
    if (first.at(i) != second.at(i)) {
      equiDistantStr[i] = second.at(i);
      distanceFromFirst++;
    }
    if (distanceFromFirst == equiDistance) {
      break;
    }
  }
  return equiDistantStr;
}
