#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const long long inf = 1e9 + 7;
char s[N];
int n;
long long dp[N][26];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  fill((long long *)dp, (long long *)dp + N * 26, inf);
  if (s[1] == 'a') dp[1][0] = 0;
  int id = 0;
  for (int i = 2; i <= n; ++i) {
    for (int j = 0; j < 26; ++j) dp[i][j] = dp[i - 1][j];
    for (int j = s[i] - 'a', k = 0; j < 26; ++j, ++k) {
      if (j == 0) {
        dp[i][j] = 0;
        continue;
      }
      dp[i][j] = min(dp[i - 1][j - 1] + k, dp[i][j]);
    }
  }
  long long ans = inf;
  for (int i = 1; i <= n; ++i) {
    if (dp[i][25] < ans) {
      ans = dp[i][25];
      id = i;
    }
  }
  if (ans == inf) {
    puts("-1");
    return 0;
  }
  char cur = 'z';
  for (int i = id; i >= 1; --i) {
    if (s[i] <= cur) {
      s[i] = cur;
      cur--;
    }
    if (cur == 'a' - 1) break;
  }
  puts(s + 1);
  return 0;
}
