#include <bits/stdc++.h>
using namespace std;
long long oo = 100000000007;
vector<long long> v;
map<long long, long long> m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long i, a, b, n, k, s;
  string s1, s2, s3;
  cin >> s1;
  cin >> s2;
  n = s1.size();
  for (i = 0; i < n; i++) {
    if (s1[i] < s2[i]) {
      cout << -1;
      return 0;
    }
  }
  cout << s2;
  return 0;
}
