#include <iostream>
#include <string>
using namespace std;

string S;

bool isdiverse(string V) {
	for (int i = 0; i < V.size(); i++) {
		for (int j = i + 1; j < V.size(); j++) { if (V[i] == V[j]) return false; }
	}
	return true;
}

int main() {
	cin >> S; S += (char)('a' - 1);
	while (S.size() >= 1) {
		while (S[S.size() - 1] < 'z') {
			S[S.size() - 1]++;
			if (isdiverse(S) == true) {
				cout << S << endl;
				return 0;
			}
		}
		S = S.substr(0, S.size() - 1);
	}
	cout << "-1" << endl;
	return 0;
}