input of the algorithm is $\pi=(\pi(1),\pi(2),\cdots, \pi(n))$. We illustrate how to recover an entry in $A^{2}$ if $\pi(1)$ is given. Let $A^{2}(i,j)$ be any entry in $A^{2}$. Since $A^{2}=(A^{1}_{\pi(1)1})^{'}$ and recall the definition of $(A^{1}_{\pi(1)1})^{'}$, which is obtained by, first permutating row $\pi(1)$ and the first row and then removing the first row and first column. Hence, if $i=\pi(1)-1$ then $(1, j+1)$ is the position where $A^{2}(i,j)$ lies of $A^{1}$; otherwise $(i+1,j+1)$ is the position where $A^{2}(i,j)$ lies of $A^{1}$. Hence, if the vector $(\pi(1),\cdots,\pi(k-1))$ is given from the SHC procedure, the position of $A^{k}(\pi(k),1)$ in $A^1$ can be found recursively by determining its position in $A^{k-1}$, then in $A^{k-2}$, and finally in $A^1$. Since at each step of the SHC procedure an element is selected from the first column, $A^{k}(\pi(k),1)$ must lie in column $k$ of $A^1$.

If $(1,k_1,\cdots,k_{n-1},1)$ is the corresponding Hamiltonian cycle of $\pi=(\pi(1)$, $\pi(2)$, $\cdots,\pi(n))$, then $k_i$ can be obtained from $k_{i+1}$ since the element $A(k_i,k_{i+1})$ is selected in Step $k_{i+1}$ of the SHC procedure, or equivalently $(k_i,k_{i+1})$ is the position of $A^{k_{i+1}}(\pi(k_{i+1}),1)$ in $A$, $i=1,2,\cdots,n-2$. Obviously, $k_{n-1}=\pi(1)$. By this simple procedure, it takes $O(n^2)$ time to recover all the positions of $A^{k}(\pi(k),1)$, $1\leq
k\leq n$. 