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