Mechanism of the ninhydrin reaction