#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  cin >> x >> y;
  const auto n = int(x.size());
  auto ok = true;
  for (auto i = 0; i < n; i++) ok &= y[i] <= x[i];
  if (ok)
    cout << y << endl;
  else
    cout << -1 << endl;
}
