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