#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
string solve(string s1, string s2) {
  string s;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] >= s2[i]) {
      s += s2[i];
    } else {
      return "-1";
    }
  }
  return s;
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  cout << solve(s1, s2) << endl;
  ;
  return 0;
}
