Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
	string words;
	string alphabet = "abcdefghijklmnopqrstuvwxyz";
	bool state = false;
	cin>>words;
	
	if(words = "zyxwvutsrqponmlkjihgfedcba"){
		cout<<-1<<endl;
		return;
	}
	
	for(int i= 0;i<26;i++){
		if(alphabet.find(words[i] == string:npos){
			state = false;
		}
		alphabet.erase(words[i]);
	}

	if(state){
		words += alphabet[0];
		cout<<words<<endl;
		return;
	}else{
		cout<<-1<<endl;
		return;
	}

	return;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: could not convert 'words.std::__cxx11::basic_string<char>::operator=(((const char*)"zyxwvutsrqponmlkjihgfedcba"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |         if(words = "zyxwvutsrqponmlkjihgfedcba"){
      |            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
a.cc:14:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |                 return;
      |                 ^~~~~~
a.cc:18:52: error: found ':' in nested-name-specifier, expected '::'
   18 |                 if(alphabet.find(words[i] == string:npos){
      |                                                    ^
      |                                                    ::
a.cc:18:58: error: expected ';' before '{' token
   18 |                 if(alphabet.find(words[i] == string:npos){
      |                                                          ^
      |                                                          ;
a.cc:18:33: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(_CharT, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   18 |                 if(alphabet.find(words[i] == string:npos){
      |                    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2758:7: note: declared here
 2758 |       find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
      |       ^~~~
a.cc:21:41: error: expected ')' before ';' token
   21 |                 alphabet.erase(words[i]);
      |                                         ^
      |                                         )
a.cc:18:19: note: to match this '('
   18 |                 if(alphabet.find(words[i] == string:npos){
      |                   ^
a.cc:21:31: error: could not convert 'alphabet.std::__cxx11::basic_string<char>::erase(((std::__cxx11::basic_string<char>::size_type)words.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))), ((std::__cxx11::basic_string<char>::size_type)std::__cxx11::basic_string<char>::npos))' from 'std::__cxx11::basic_string<char>' to 'bool'
   21 |                 alphabet.erase(words[i]);
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~
      |                               |
      |                               std::__cxx11::basic_string<char>
a.cc:27:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   27 |                 return;
      |                 ^~~~~~
a.cc:30:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   30 |                 return;
      |                 ^~~~~~
a.cc:33:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |         return;
      |         ^~~~~~