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