Input (grade 13): Potassium reacts very violently with water producing potassium hydroxide (KOH) and hydrogen gas.
Output (grade 11): It is extracted from them by electrolysis of potassium hydroxide or potassium chloride. The potassium hydroxide or potassium chloride has to be melted at a very high temperature.