Problem: Your task is the exact same as for the easy version. But this time, the marmots subtract the village's population P from their random number before responding to Heidi's request.

Also, there are now villages with as few as a single inhabitant, meaning that <image>.

Can you help Heidi find out whether a village follows a Poisson or a uniform distribution?

Input

Same as for the easy and medium versions. But remember that now 1 ≤ P ≤ 1000 and that the marmots may provide positive as well as negative integers.

Output

Output one line per village, in the same order as provided in the input. The village's line shall state poisson if the village's distribution is of the Poisson type, and uniform if the answers came from a uniform distribution.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
int a[1105];
void fmain(int tid) {
  long double ss = 0;
  int mx = -(1 << 30);
  for (int(i) = 1; (i) <= (int)(250); (i)++) scanf("%d", a + i);
  for (int(i) = 1; (i) <= (int)(250); (i)++) {
    ss += a[i];
    mx = max(mx, a[i]);
  }
  ss /= 250;
  long double fang = 0;
  for (int(i) = 1; (i) <= (int)(250); (i)++) fang += a[i] * a[i];
  fang /= 250;
  fang -= ss * ss;
  fang = sqrt(fang);
  if (mx / fang <= 1.9)
    puts("uniform");
  else
    puts("poisson");
}
int main() {
  int t = 1;
  scanf("%d", &t);
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}