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