#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string x, y;
  cin >> x >> y;
  for (long long i = 0; i < x.size(); i++)
    if (y[i] > x[i]) return cout << "-1\n", 0;
  cout << y << '\n';
  return 0;
}
