Constructive Problems Never Die
题号:NC240404
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Grammy has a sequence A of length n.

Please find a permutation P such that for all i.

输入描述:

There are multiple test cases. 

The first line contains a single integer T (), denoting the number of test cases.

For each test case:

The first line contains a single integer n ().

The second line contains n integers ().

It is guaranteed that the sum of n does not exceed .

输出描述:

For each test case: 

If the permutation does not exist, output “NO” in one line.

Otherwise output “YES” in the first line, then output n integers in the second line, denoting the permutation .
示例1

输入

复制
3
3
3 3 3
3
3 2 1
6
1 1 4 5 1 4

输出

复制
NO
YES
1 3 2
YES
4 5 1 2 3 6