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