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