#C1172. Shuffle Playlist

    ID: 41067 Type: Default 1000ms 256MiB

Shuffle Playlist

Shuffle Playlist

Given a playlist of unique song IDs, your task is to shuffle the playlist using a deterministic random algorithm. To ensure reproducibility, initialize the random number generator with the seed \(42\). The shuffled playlist must be a permutation of the original playlist and, if the playlist contains more than one song, the resulting order must differ from the input order.

inputFormat

The input is read from standard input (stdin). The first line contains an integer \(n\) representing the number of songs. The second line contains \(n\) distinct integers separated by spaces that represent the song IDs in the playlist.

outputFormat

Output the shuffled playlist as a sequence of \(n\) integers separated by spaces on a single line, printed to standard output (stdout).

## sample
5
1 2 3 4 5
2 3 5 1 4