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