Added working solution for CHAOS.cpp.