#include <bits/stdc++.h>
using namespace std;
int used[2000001], a[101], b[101];
int main() {
  int t, n;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    cin >> n;
    for (int j = 0; j < n; ++j) {
      cin >> a[j];
    }
    int c1 = 0, c2 = 1;
    string ans = "YES";
    while (c1 < n) {
      bool works = true;
      for (int j = 0; j < n; ++j) {
        if (used[c2 + a[j]] == 1) {
          works = false;
          break;
        }
      }
      if (works == true) {
        b[c1] = c2;
        for (int j = 0; j < n; ++j) {
          used[c2 + a[j]] = 1;
        }
        c1++;
      }
      c2++;
      if (c2 > 1000000) {
        ans = "NO";
        break;
      }
    }
    cout << ans << '\n';
    if (ans == "YES") {
      for (int j = 0; j < n; ++j) {
        cout << b[j] << " ";
      }
      cout << '\n';
    }
    memset(used, 0, sizeof used);
  }
}
