#include <bits/stdc++.h>
bool is_possible(const std::string &s1, const std::string &s2) {
  int n = s1.size();
  for (int i = 0; i < n; ++i)
    if (s1[i] < s2[i]) return false;
  return true;
}
int main() {
  std::string s1, s2;
  std::cin >> s1 >> s2;
  if (!is_possible(s1, s2)) {
    std::cout << -1 << '\n';
    return 0;
  }
  std::cout << s2 << '\n';
}
