#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main(){
const std::string data =
"A gentle, dull flickering flame, burns in the marble hearth. "
"Its dim light scarcely illuminates the small, cozy room with its "
"figure of a wooden desk at which Allen was roaming through his "
"memories. Thinking back in the past where he once had a "
"friendship which was out righteously incredible. She was the "
"girl of his dreams, in a way which she had everything he had "
"ever sought out in a beautiful and clever girl. Most of all she "
"had his heart. Her style was incredible in the way the outfits "
"she would wear would match perfectly giving a deep vibrant lively feeling.";
char choice;
const char decrypt = 'd';
const char encrypt = 'e';
while (std::cin >> choice && (choice == decrypt || choice == encrypt))
{
if (choice == decrypt)
{
// consume any leading whitespace:
std::cin >> std::ws;
// read in the line of text that contains the code to decrypt.
std::string line;
std::getline(std::cin, line);
// convert the line into a stream:
std::istringstream code_stream(line);
int code;
// while stream extraction is successful,
while (code_stream >> code)
std::cout << data[code]; // output the decrypted character.
}
else
std::cout << "Unimplemented";
std::cout << std::endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpewogICAgY29uc3Qgc3RkOjpzdHJpbmcgZGF0YSA9CiAgICAgICAgIkEgZ2VudGxlLCBkdWxsIGZsaWNrZXJpbmcgZmxhbWUsIGJ1cm5zIGluIHRoZSBtYXJibGUgaGVhcnRoLiAiCiAgICAgICAgIkl0cyBkaW0gbGlnaHQgc2NhcmNlbHkgaWxsdW1pbmF0ZXMgdGhlIHNtYWxsLCBjb3p5IHJvb20gd2l0aCBpdHMgIgogICAgICAgICJmaWd1cmUgb2YgYSB3b29kZW4gZGVzayBhdCB3aGljaCBBbGxlbiB3YXMgcm9hbWluZyB0aHJvdWdoIGhpcyAiCiAgICAgICAgIm1lbW9yaWVzLiBUaGlua2luZyBiYWNrIGluIHRoZSBwYXN0IHdoZXJlIGhlIG9uY2UgaGFkIGEgIgogICAgICAgICJmcmll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