Anders Kaseorg's submission of Edgy | CodeChef