Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define loop(i,b,e) for(auto i=b;i<=e;i++)
- #define reloop(i,e,b) for(auto i=e;i>=b;i--)
- #define all(x) x.begin(),x.end()
- #define ll long long
- #define pb push_back
- #define mp make_pair
- #define fi first
- #define se second
- #define pf printf
- #define sf scanf
- string s,alph="abcdefghijklmnopqrstuvwxyz";
- int j;
- int main() {
- cin >> s;
- if(s.length() < 26) {
- pf("-1");
- return 0;
- }
- loop(i,0,s.length()-1)
- if(s[i] <= alph[j]) s[i] = alph[j],j++;
- if(j < 26) pf("-1");
- else cout << s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement