#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int INF = 1e9;
const double EPS = 1e-8;
int main() {
  string a, b;
  cin >> a >> b;
  int len = a.size();
  for (int i = 0; i < len; i++) {
    if (b[i] > a[i]) {
      puts("-1");
      return 0;
    }
  }
  cout << b << endl;
}
