#include <bits/stdc++.h>
using namespace std;
void checkDefine();
string x;
string y;
string z;
int main() {
  cin >> x >> y;
  long long int n = x.size();
  for (int i = (0), _b = (n - 1); i <= _b; i++) {
    if (x[i] < y[i]) {
      cout << -1;
      return 0;
    }
  }
  cout << y;
  return 0;
}
void checkDefine() {
  long long int n, a[200005];
  map<long long int, long long int> m;
  cin >> n;
  for (int i = (0), _b = (n - 1); i <= _b; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  string s;
  cin >> s;
  {
    cout << "s"
         << " = ";
    cout << (s) << endl;
  };
  {
    cout << "a"
         << " = ";
    for (int _ = 0, _a = (n); _ < _a; _++) cout << a[_] << ' ';
    cout << endl;
  };
  {
    cout << "\"------------\""
         << " = ";
    cout << ("------------") << endl;
  };
  for (__typeof(m.begin()) it = m.begin(); it != m.end(); ++it) {
    cout << it->first << " " << it->second << endl;
  }
}
