This is a really cool algorithmical assignment I got and solved. Enjoyed