#include <bits/stdc++.h>
using namespace std;
const long long eps = (long long)1000000000000000;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  bool ind = true;
  for (int i = 0; i < s.size() && ind; i++) {
    if (t[i] > s[i]) {
      ind = false;
    }
  }
  if (ind) {
    cout << t;
  } else {
    cout << "-1";
  }
  return 0;
}
