Added solution to P22, without custom sorting.