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