#include <bits/stdc++.h>
using namespace std;
int main() {
  int flag = 0;
  string x, y, z;
  cin >> x >> y;
  int n = x.size();
  for (int i = 0; i < n; i++) {
    if (y[i] <= x[i])
      z.push_back(y[i]);
    else {
      cout << -1;
      flag = -1;
      break;
    }
  }
  if (flag == 0) cout << z;
  return 0;
}
