def spin(programs, move):
    """Spin, written sX, makes X programs move from the end to the front, but maintain their order otherwise.
    (For example, s3 on abcde produces cdeab)."""
    move_ = int(move[1:])
    return programs[len(programs) - move_:] + programs[:len(programs) - move_]