#include <bits/stdc++.h>
using namespace std;
const int p = 1e9 + 7;
int n, a[1002][1002], y[1002], f[1002], py[1002];
bool v[1002][1002];
inline int ksm(int d, int k) {
  int ret = 1;
  while (k) {
    if (k & 1) ret = 1ll * ret * d % p;
    d = 1ll * d * d % p;
    k >>= 1;
  }
  return ret;
}
inline void cal(int va) {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) a[i][j] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      if (v[i][j])
        a[i][j] = (a[i][j] - va + p) % p, a[i][i] = (a[i][i] + va) % p;
      else
        a[i][j] = (a[i][j] - 1 + p) % p, a[i][i] = (a[i][i] + 1) % p;
    }
  y[va] = 1;
  for (int i = 1; i < n; i++) {
    int t = i;
    for (int j = i; j < n; j++)
      if (a[j][i]) {
        t = j;
        break;
      }
    if (t ^ i) {
      for (int j = i; j < n; j++) swap(a[i][j], a[t][j]);
      y[va] = (p - y[va]) % p;
    }
    y[va] = 1ll * y[va] * a[i][i] % p;
    if (!y[va]) break;
    int iv = ksm(a[i][i], p - 2);
    for (register int j = i + 1; j < n; j++) {
      int dv = 1ll * iv * a[j][i] % p;
      for (register int k = i; k < n; k++)
        a[j][k] = (a[j][k] - 1ll * dv * a[i][k] % p + p) % p;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x][y] = v[y][x] = 1;
  }
  for (int i = 0; i <= n; i++) cal(i);
  for (int i = 0; i <= n; i++) {
    memset(py, 0, sizeof(py));
    py[0] = y[i];
    for (register int j = 0; j <= n; j++) {
      if (i == j) continue;
      int yx = ksm((i - j + p) % p, p - 2), cx = 1ll * (p - j) % p * yx % p;
      for (register int k = n; ~k; k--) {
        py[k] = 1ll * py[k] * cx % p;
        if (k) py[k] = (py[k] + 1ll * py[k - 1] * yx % p) % p;
      }
    }
    for (int j = 0; j <= n; j++) f[j] = (f[j] + py[j]) % p;
  }
  for (int i = 0; i < n; i++) printf("%d ", f[i]);
  puts("");
}
