#include <bits/stdc++.h>
using namespace std;

int T[26];

int main()
{
	string str, cur, ans;
	int flag = 0;
	cin >> str;
	for (int i = 0, len = str.length(); i <= len; i++) {
		for (int j = (i == len ? 0 : str[i]-'a'+1); j < 26; j++)
			if (!T[j]) {
				if (!flag) flag = 1, ans = cur+char(j+'a');
				else ans = min(ans, cur+char(j+'a'));
				break;
			}
		if (i == len) 
			break;
	        cur = cur+str[i];
		T[str[i]-'a'] = 1;
	}
	if (flag == 0) puts("-1");
	else cout << ans << endl;
	return 0;
}
