#include <bits/stdc++.h>
using namespace std;
template <class T>
bool ckmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
template <class T>
bool ckmin(T &x, T y) {
  return x > y ? x = y, 1 : 0;
}
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = 0;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
inline int qpow(int n, int k) {
  int res = 1;
  for (; k; k >>= 1, n = 1ll * n * n % 1000000007)
    if (k & 1) res = 1ll * n * res % 1000000007;
  return res;
}
vector<int> lagrange(const vector<int> &x, const vector<int> &y) {
  assert(x.size() == y.size());
  int n = x.size();
  vector<int> a(n, 0), b(n + 1, 0), c(n + 1, 0), f(n, 0);
  for (int i = 0; i < n; ++i) {
    int A = 1;
    for (int j = 0; j < n; ++j)
      if (i != j) A = 1ll * A * (x[i] - x[j] + 1000000007) % 1000000007;
    a[i] = 1ll * qpow(A, 1000000007 - 2) * y[i] % 1000000007;
  }
  b[0] = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j >= 1; --j)
      b[j] = (1ll * b[j] * (1000000007 - x[i]) + b[j - 1]) % 1000000007;
    b[0] = 1ll * b[0] * (1000000007 - x[i]) % 1000000007;
  }
  for (int i = 0; i < n; ++i) {
    int iv = qpow(1000000007 - x[i], 1000000007 - 2);
    if (!iv) {
      for (int j = 0; j < n; ++j) c[j] = b[j + 1];
    } else {
      c[0] = 1ll * b[0] * iv % 1000000007;
      for (int j = 1; j <= n; ++j)
        c[j] = 1ll * (b[j] + 1000000007 - c[j - 1]) * iv % 1000000007;
    }
    for (int j = 0; j < n; ++j)
      f[j] = (f[j] + 1ll * a[i] * c[j] % 1000000007) % 1000000007;
  }
  return f;
}
int det(vector<vector<int> > a, int n) {
  int res = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      while (a[j][i]) {
        int d = a[i][i] / a[j][i];
        for (int k = i; k < n; ++k)
          a[i][k] = (a[i][k] + 1000000007 - 1ll * a[j][k] * d % 1000000007) %
                    1000000007,
          swap(a[i][k], a[j][k]);
        res *= -1;
      }
    }
    if (!a[i][i]) return 0;
    res = 1ll * res * a[i][i] % 1000000007;
  }
  return res < 0 ? res + 1000000007 : res;
}
signed main() {
  int n = read();
  vector<int> x(n), y(n);
  vector<vector<int> > a(n), mp(n);
  for (int i = 0; i < n; ++i) {
    a[i].resize(n), mp[i].resize(n);
    memset(mp[i].data(), 0, n << 2);
  }
  for (int i = 0; i < n - 1; ++i) {
    int x = read() - 1, y = read() - 1;
    mp[x][y] = mp[y][x] = 1;
  }
  for (int z = 0; z < n; ++z) {
    for (int i = 0; i < n; ++i) {
      a[i][i] = 0;
      for (int j = 0; j < n; ++j) {
        if (i == j)
          continue;
        else if (!mp[i][j])
          ++a[i][i], a[i][j] = 1000000007 - 1;
        else
          a[i][i] += z, a[i][j] = 1000000007 - z;
      }
    }
    x[z] = z, y[z] = det(a, n - 1);
  }
  vector<int> f = lagrange(x, y);
  for (int i = 0; i < n; ++i) printf("%d ", f[i]);
  return 0;
}
