#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  long long int i;
  bool flag = true;
  for (i = 0; i < s1.length(); ++i) {
    if ((s2[i] - s1[i]) > 0) {
      cout << -1 << endl;
      flag = false;
      break;
    }
  }
  if (flag == true) {
    cout << s2 << endl;
  }
}
