Paradox with Dice
I, Varvara Andriivna, possess a peculiar trait. I detest gambling, yet when I must play, I invariably win. Les caprices de la fortune.
"The Turkish Gambit"
During the evening kefir session at the 13th house, Nataliya Mykhailivna intends to demonstrate an intriguing paradox to the kittens.
Around the table, n kittens will be seated, each receiving a die from Nataliya Mykhailivna. Each die has six faces, with numbers inscribed on them. To ensure no ties occur, Nataliya Mykhailivna will prepare a set of dice such that every number from 1 to 6n appears exactly once across all the dice faces.
Two adjacent students can engage in a game against each other. In this game, they roll their dice, and the student with the higher number wins.
The paradox is that for each player, the probability of winning against the player to their right is strictly greater than 1/2.
Assist Nataliya Mykhailivna in creating such a set of dice.
Input
The input file contains the number n - representing the number of participants (3 ≤ n ≤ 100).
Output
The output file should contain n rows, each describing a die. Each row consists of six numbers that appear on the faces of the corresponding die. All numbers from 1 to 6n must appear exactly once in the output file.
The die described in the first row should win against the die described in the second row with a probability strictly greater than 1/2. The second die should win against the third die, and so forth, with the last die winning against the first with a probability strictly greater than 1/2.