This is a procedure to brute force the answers to the Librarian's Almanaq problem "The Loop".
The trick to the loop is the Mobius strip. I have implemented Mobius loops here.
Just run and review the output for results. One of the output results will be the right answer.
This is a single example of a possible combination
-B-------S------\/--A------\/--E---\/----\/--I---\/-----A---\/-----K------\/--E------\/--A---\/--P------
--M--\/---L--\/-/\---U--\/-/\---A--/\-\/-/\---M--/\-\/---T--/\-\/---A--\/-/\---G--\/-/\---F--/\---N--\/-
---G-/\----R-/\-------E-/\-------L----/\-------I----/\----A----/\----R-/\-------R-/\-------T-------&-/\-
BSULIAARANGLEEITKGT&MRAAM
You should be able to connect the tape in the manner described above the result. The twist is after the last card in the stack. The X is where two lines cross over. They may be printed with the twists before or after another in the printout, but they still become the same type of shuffle from the input to the output.