#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  string z;
  cin >> x;
  cin >> z;
  int len = x.length();
  char y[len];
  regex reg("[a-z]");
  for (int i = 0; i <= len; i++) {
    if (x[i] == z[i] && regex_search(z, reg))
      y[i] = 'z';
    else if (x[i] > z[i] && regex_search(z, reg))
      y[i] = z[i];
    else {
      cout << "-1";
      return 0;
    }
  }
  y[len] = '\0';
  cout << y << endl;
  return 0;
}
