very simple solution based on frequency analysis. only misses the last dot