Choosing k randomly.