#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  cin >> x >> y;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] < y[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < x.size(); i++) {
    if (x[i] > y[i])
      cout << y[i];
    else if (x[i] == y[i])
      cout << 'z';
  }
  return 0;
}
