Python program for Koi example