Fix logogrif algo

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
Add metagram algo

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>