Simple implementation of frequency analysis for substitution ciphers