#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s1, s2;
  cin >> s1 >> s2;
  string s3;
  int l = 0;
  int flag = 0;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] < s2[i]) {
      flag = 1;
      break;
    }
  }
  if (flag) {
    cout << -1 << endl;
  } else {
    cout << s2 << endl;
  }
}
int main() { solve(); }
