8. A scientist stored the design blueprint of a time machine on a computer, setting the file opening password as a permutation of $\{1,2, \cdots, 64\}$. They also designed a program that, when eight positive integers between 1 and 64 are input each time, the computer will indicate the order (from left to right) of these eight numbers in the password. Please design an operation scheme that can determine this password with at most 45 inputs.
8. Prepare $n^{2}(n=8)$ cards, the front side of which are numbered $1,2, \cdots, n^{2}$, and the back side indicates the position of the number in the password (counting from the left). Of course, the operator does not know the numbers on the back side in advance.

First, divide the $n^{2}$ cards into $n$ groups (each group has $n$ cards). In the first $n$ operations, input the card numbers of each group once, which allows you to know the size order of the numbers on the back side of each group (also recorded as the size order of the cards).

Arrange the cards in each group in ascending order and place them on the table, forming an $n \times n$ matrix $\left(a_{i j}\right)$, where $a_{i j}$ is the card number of the $i$-th card in the $j$-th group, and the corresponding number on the back side is $b_{i j}$.
Second, input the numbers of the following two sets of cards:
$\left\{a_{1 j} \mid j=1,2, \cdots, n\right\},\left\{a_{n j} \mid j=1,2, \cdots, n\right\}$.
These $2 n$ cards are called “original cards” (the former are “original small cards,” and the latter are “original large cards”). Then,
$\min _{1 \leqslant j \leqslant n} b_{1 j}=\min _{1 \leqslant j \leqslant n} \min _{1 \leqslant i \leqslant n} b_{i j}=\min _{1 \leqslant i, j \leqslant n} b_{i j}$,
$\max _{1 \leq j \leqslant n} b_{n j}=\max _{1 \leqslant j \leqslant n} \max _{1 \leq i \leqslant n} b_{i j}=\max _{1 \leqslant i, j \leqslant n} b_{i j}$.
Thus, you know the card numbers of the smallest and largest numbers in $\left\{b_{i j}\right\}$ (i.e., the first and last two numbers in the password). Remove these two cards and move the card below (above) the front (back) card to its position (called “new small (large) card”).

Then, input the card numbers of these two new cards and the $\frac{n}{2}-1$ smaller (larger) cards from the original small (large) cards, which allows you to know the card numbers of the smallest and largest numbers among the remaining $n^{2}-2$ $b_{i j}$ (i.e., the 2nd and $n^{2}-1$th numbers in the password).

Similarly, by following the two operation methods below, you can arrange all the cards in ascending order based on the numbers on the back side, and the card numbers on the front side will form the password.

Operation A: When the number of new small and large cards is less than $\frac{n}{2}$, input the card numbers of these new cards and some smaller (larger) cards from the original cards to form $\frac{n}{2}$ smaller cards and $\frac{n}{2}$ larger cards (i.e., take $\frac{n}{2}$ cards from the 1st and $n$th rows on the table). This allows you to know the card numbers of the smallest and largest cards on the table. Remove these two cards and move the card below (above) the front (back) card to its position (called new small (large) card).

Operation B: When the number of new small (or large) cards is $\frac{n}{2}$, input the card numbers of all cards in the 1st (or $n$th) row (i.e., $\frac{n}{2}$ original small (or large) cards and $\frac{n}{2}$ new small (or large) cards, which are all renamed as original cards). This allows you to know the card number of the smallest (or largest) card on the table. Remove this card and move the card below (or above) it to its position (called new small (or large) card).

The feasibility of the operations is obvious, and all operations except the first $n$ can be considered as either operation A or B. The $n+1$th and $n+2$th operations can be considered as operation B, and the $n+3$th operation can be considered as operation A.

Assume that operations A and B are performed $x$ and $y$ times, respectively, until all cards are removed.

Since each operation A removes 2 cards, each operation B removes 1 card, and the last operation can remove at most $n$ cards, we have
$2 x+y \leqslant n^{2}-n+2$.
Note that each operation A can increase the number of new cards by at most 2, and each operation B can decrease the number of new cards by $\frac{n}{2}-1$.
If the last operation is operation B, then
$2 x+2 \geqslant\left(\frac{n}{2}-1\right)(y-2)+1$;
If the last operation is operation A, then
$2(x-1)+2 \geqslant\left(\frac{n}{2}-1\right)(y-2)$.
From equations (1) and (2),
$\Rightarrow 2 x+y-1 \geqslant \frac{n}{2}(y-2)$
$$
\begin{array}{l}
\Rightarrow n^{2}-n+1 \geqslant \frac{n}{2}(y-2) \\
\Rightarrow \frac{y}{2} \leqslant n+\frac{1}{n} .
\end{array}
$$

Thus, the total number of operations is
$$
\begin{array}{l}
n+x+y=n+\frac{(2 x+y)+y}{2} \\
\leqslant n+\frac{n^{2}-n+2}{2}+n+\frac{1}{n}
\end{array}
$$
$$
\begin{array}{l}
=\frac{(n+1)(n+2)}{2}+\frac{1}{n}=45 \frac{1}{8} \\
\Rightarrow n+x+y \leqslant 45 .
\end{array}
$$

[Note] If a column is emptied ahead of time, you can take any card from the 2nd to the $n-1$th row of other columns to fill it.