Try to write a JavaScript implementation
Try to write a python implementation