#include <bits/stdc++.h>
const int maxn = 2505;
int f[maxn][maxn][3][3], g[maxn][3][3], n, m, u, v, vis[maxn], up[maxn],
    aim[maxn], siz[maxn], ins[maxn];
std::vector<int> ch[maxn], E[maxn];
void dfs1(int u, int fa) {
  vis[u] = ins[u] = 1;
  for (int v : E[u]) {
    if (v == fa) continue;
    if (vis[v]) {
      if (ins[v]) up[u] = v;
      continue;
    }
    ch[u].push_back(v);
    dfs1(v, u);
  }
  ins[u] = 0;
}
void clear(int u) {
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= 2; ++j)
      for (int k = 0; k <= 2; ++k) f[u][i][j][k] = -1e9;
}
void dfs(int u) {
  clear(u);
  f[u][0][0][0] = 0;
  f[u][1][1][up[u] != 0] = 0;
  f[u][0][2][2 * (up[u] != 0)] = 1;
  siz[u] = 1;
  for (int v : ch[u]) {
    dfs(v);
    std::memcpy(g, f[u], sizeof(g));
    clear(u);
    for (int i = 0; i <= siz[u]; ++i)
      for (int a = 0; a <= 2; ++a)
        for (int b = 0; b <= 2; ++b)
          for (int j = 0; j <= siz[v]; ++j)
            for (int c = 0; c <= 2; ++c)
              for (int d = 0; d <= 2; ++d) {
                if (a + c == 3) continue;
                if (aim[v] == u && a + d == 3) continue;
                int nw;
                if (aim[v] && aim[v] != u)
                  nw = d;
                else
                  nw = b;
                f[u][i + j][a][nw] =
                    std::max(f[u][i + j][a][nw], g[i][a][b] + f[v][j][c][d]);
              }
    if (aim[v] && aim[v] != u) aim[u] = aim[v];
    siz[u] += siz[v];
  }
  if (up[u]) {
    assert(!aim[u]);
    aim[u] = up[u];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &u, &v);
    E[u].push_back(v);
    E[v].push_back(u);
  }
  dfs1(1, 0);
  dfs(1);
  for (int i = 0; i <= n; ++i) {
    int ans = 0;
    for (int j = 0; j <= 2; ++j)
      for (int k = 0; k <= 2; ++k) ans = std::max(ans, f[1][i][j][k]);
    printf("%d ", ans);
  }
  return 0;
}
