#include <bits/stdc++.h>
using namespace std;
int main() {
  string S1, S2;
  cin >> S1 >> S2;
  string Z = "";
  bool check = false;
  for (int i = 0; i < S1.length(); i++) {
    if (S1[i] == S2[i]) {
      Z += S1[i];
    } else if (S1[i] < S2[i]) {
      check = true;
      break;
    } else {
      Z += S2[i];
    }
  }
  if (check)
    cout << -1 << endl;
  else
    cout << Z << endl;
  return 0;
}
