Final code for the team Sultans of Silicon.