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