[Q9.3]find magic index, which has value the same as its index