#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
string a;
string b;
vector<string> vt;
int ch[26];
int main()
{
	cin >> a;
	int t = a.size();
	for (int i = 0; i < t; i++)
	{
		for (int y = a[i] - 'a' + 1; y < 26; y++)
		{
			if (!ch[y])
			{
				string c = b + (char)(y + 'a');
				vt.push_back(c);
				break;
			}
		}
		b += a[i];
		ch[a[i] - 'a']++;
	}
	for (int i = 0; i < 26; i++) {
		if (!ch[i])
		{
			string c = a + (char)(i + 'a');
			vt.push_back(c);
			break;
		}
	}
	if (!vt.size()) {
		puts("-1");
		return 0;
	}
	sort(vt.begin(), vt.end());
	cout << vt[0];

}