#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, m, n, ok = 0;
  char s1[110], s2[110], ans[110];
  scanf("%s", s1);
  scanf("%s", s2);
  l = strlen(s1);
  for (i = 0; i < l; i++) {
    if (s1[i] > s2[i]) {
      ans[i] = s2[i];
    } else if (s1[i] < s2[i]) {
      ok = 1;
      break;
    } else
      ans[i] = s1[i];
  }
  ans[l] = '\0';
  if (ok)
    printf("-1\n");
  else
    puts(ans);
  return 0;
}
