Current implementation fails if we use numeric only alphabet. But from an algorithm perspective it should be working.