Python solutions