#include <bits/stdc++.h>
using namespace std;
int N;
string X, Y;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> X >> Y;
  N = X.length();
  for (int i = 0; i < (N); i++) {
    if (Y[i] > X[i]) {
      cout << -1 << "\n";
      return 0;
    }
  }
  cout << Y << "\n";
  return 0;
}
