#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, d;
  cin >> s >> d;
  string ans = "";
  bool flag = true;
  for (int i = 0; i < s.length(); i++) {
    if (d[i] > s[i]) {
      flag = false;
      break;
    } else if (d[i] == s[i]) {
      if (s[i] != 'z')
        ans.push_back(s[i] + 1);
      else
        ans.push_back(s[i]);
    } else
      ans.push_back(d[i]);
  }
  if (flag)
    cout << ans << endl;
  else
    cout << "-1" << endl;
  return 0;
}
