Rearranging query sense file