#include <bits/stdc++.h>
using namespace std;
vector<int> vec[10];
vector<vector<int> > vvv(183);
queue<int> qu;
map<string, int> mp;
map<string, int>::iterator iter;
bool ch[10] = {false};
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] >= s2[i])
      s1[i] = s2[i];
    else {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << s1 << endl;
  return 0;
}
