For each test case, print one line holding a permutation of the numbers 1 through n that is a consensus ranking. Separate the numbers with single spaces.
If more than one consensus ranking exists, print the lexicographically smallest one. A sequence a1,…,an is lexicographically smaller than a sequence b1,…,bn if there is a positive integer j such that ai=bi for all 1≤i≤j−1 and aj<bj.
If no consensus ranking exists, print No solution instead.