// 7H15 M3554G3 is written in leet speak, where numbers resemble letters.
// place each leetspeak character with its matching letter
// (7 -> T, 1 -> I, 5 -> S, 3 -> E) and build a new string
// 7H15 -> THIS | M3554G3 -> MESSAGE
// Your brain can interpret distorted or number‑substituted letters
// surprisingly well because it recognizes the overall word
// shapes and patterns, not just individual characters.
#include <iostream>
#include <string>
#include <unordered_map>
std::string leetToText(const std::string& s) {
std::unordered_map<char, char> map = {
{'7', 'T'},
{'1', 'I'},
{'5', 'S'},
{'3', 'E'},
{'4', 'A'},
{'0', 'O'}
};
std::string out;
out.reserve(s.size());
for (char c : s) {
if (map.count(c))
out.push_back(map[c]);
else
out.push_back(c); // keep letters like H, M, G
}
return out;
}
int main() {
std::string input = "7H15 M3554G3";
std::cout << leetToText(input) << std::endl;
}
/*
run:
THIS MESSAGE
*/