Added solution to #24