#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
int main() {
  ios_base::sync_with_stdio(0);
  string x, y;
  while (cin >> x >> y) {
    string res = "";
    bool bad = 0;
    for (int i = 0; i < x.length() && !bad; ++i) {
      if (x[i] < y[i])
        bad = 1;
      else {
        res += string(1, y[i]);
      }
    }
    if (bad)
      cout << "-1\n";
    else {
      cout << res << "\n";
    }
  }
  return 0;
}
