#include <bits/stdc++.h>
using namespace std;
char mize(char a, char b) {
  if (a == b)
    return 'z';
  else
    return min(a, b);
}
int main() {
  string x, z;
  char y[102];
  char t[102];
  bool b = true, bo = true;
  int index;
  cin >> x >> z;
  int len = x.size();
  int len2 = z.size();
  for (int i = 0; i < len; i++) {
    y[i] = mize(x[i], z[i]);
  }
  for (int i = 0; i < len2; i++) {
    t[i] = mize(x[i], y[i]);
    if (z[i] == 'z' && t[i] == 'z' && x[i] != 'z') t[i] = 'x';
  }
  for (int i = 0; i < len; i++) {
    if (t[i] != z[i]) {
      b = false;
      break;
    }
  }
  if (b) {
    for (int i = 0; i < len; i++) {
      cout << y[i];
    }
    cout << endl;
  } else
    cout << "-1" << endl;
  return 0;
}
