#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[105], s2[105];
  while (~scanf("%s%s", s1, s2)) {
    int k = strlen(s1);
    int flag = 0;
    for (int i = 0; i < k; i++) {
      if (s1[i] < s2[i]) {
        flag = 1;
        break;
      }
    }
    if (flag)
      printf("-1\n");
    else
      printf("%s\n", s2);
  }
  return 0;
}
