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