#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> a, const pair<int, int> b) {
  return a.second < b.second;
}
int main() {
  string s1;
  cin >> s1;
  string s2;
  cin >> s2;
  bool flag = false;
  string ans = "\0";
  for (int i = 0; i < s1.length(); i++) {
    if (int(s1[i]) < int(s2[i])) flag = true;
  }
  if (s1.length() != s2.length()) flag = true;
  if (flag == false) {
    for (int i = 0; i < s1.length(); i++) {
      if (int(s1[i]) == int(s2[i]))
        ans += 'z';
      else if (int(s1[i]) > int(s2[i]))
        ans += s2[i];
    }
  }
  if (flag == true)
    cout << "-1" << endl;
  else
    cout << ans << endl;
  return 0;
}
