#include <bits/stdc++.h>
using namespace std;
string st, str;
int main() {
  cin >> st >> str;
  for (int i = 0; i < st.size(); i++) {
    if (st[i] < str[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << str << endl;
  return 0;
}
