Working solution for KataPotter