Initial revision of solution based on usage common sequences generator.