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