#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
string a, b;
signed main() {
  cin >> a >> b;
  for (int i = 0; i < a.length(); ++i)
    if (a[i] < b[i]) return puts("-1"), 0;
  puts(b.c_str());
  return 0;
}
