We introduce a sorting machine consisting of k + 1 stacks in series: the first k stacks can only contain elements in decreasing order from top to bottom, while the last one has the opposite restriction. This device generalizes [10], which studies the case k = 1. Here we show that, for k = 2, the set of sortable permutations is a class with infinite basis, by explicitly finding an antichain of minimal nonsortable permutations. This construction can easily be adapted to each k ≥ 3. Next we describe an optimal sorting algorithm, again for the case k = 2. We then analyze two types of left-greedy sorting procedures, obtaining complete results in one case and only some partial results in the other one. We close the paper by discussing a few open questions. * G. C. and L. F. are members of the INdAM Research group GNCS; they are partially supported by IN-dAM -GNCS 2019 project "Studio di proprietá combinatoriche di linguaggi formali ispirate dalla biologia e da strutture bidimensionali" and by a grant of the "Fondazione della Cassa di Risparmio di Firenze" for the project "Rilevamento di pattern: applicazioni a memorizzazione basata sul DNA, evoluzione del genoma, scelta sociale".