#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
int main( )
{
std:: vector < std:: string > words
{
"chuffed" ,
"apparent" ,
"buckle" ,
"awful" ,
"besides" ,
"check" ,
} ;
std:: string input;
while ( std:: cout << "Enter a word\n > " && std:: cin >> input && input ! = "quit" )
{
auto it = std:: find ( words.begin ( ) , words.end ( ) , input) ;
if ( it ! = words.end ( ) )
std:: cout << '"' << input << "\" is string number " << ( it - words.begin ( ) ) + 1 << '\n ' ;
else
std:: cout << '"' << input << "\" is not found!\n " ;
}
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8c3RyaW5nPgoKaW50IG1haW4oKQp7CiAgICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gd29yZHMgCiAgICB7CiAgICAgICAgImNodWZmZWQiLCAKICAgICAgICAiYXBwYXJlbnQiLCAKICAgICAgICAiYnVja2xlIiwgCiAgICAgICAgImF3ZnVsIiwgCiAgICAgICAgImJlc2lkZXMiLCAKICAgICAgICAiY2hlY2siLAogICAgfTsKCiAgICBzdGQ6OnN0cmluZyBpbnB1dDsKCiAgICB3aGlsZSAoc3RkOjpjb3V0IDw8ICJFbnRlciBhIHdvcmRcbj4gIiAmJiBzdGQ6OmNpbiA+PiBpbnB1dCAmJiBpbnB1dCAhPSAicXVpdCIpCiAgICB7CiAgICAgICAgYXV0byBpdCA9IHN0ZDo6ZmluZCh3b3Jkcy5iZWdpbigpLCB3b3Jkcy5lbmQoKSwgaW5wdXQpOwoKICAgICAgICBpZiAoaXQgIT0gd29yZHMuZW5kKCkpCiAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAnIicgPDwgaW5wdXQgPDwgIlwiIGlzIHN0cmluZyBudW1iZXIgIiA8PCAoaXQgLSB3b3Jkcy5iZWdpbigpKSArIDEgPDwgJ1xuJzsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAnIicgPDwgaW5wdXQgPDwgIlwiIGlzIG5vdCBmb3VuZCFcbiI7CiAgICB9Cn0=