#include <bits/stdc++.h>
using namespace std;
const int M = 3005, inf = 1e9;
int n, m;
int read() {
  int x = 0, y = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') y = (ch == '-') ? -1 : 1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return x * y;
}
vector<int> G[M];
int p[3], sz[M], cir[M], g[M][3], f[M][M][3];
int num = 0, fa[M], dfn[M], low[M];
void Merge(int u, int v) {
  for (int i = 0; i <= sz[u] + sz[v]; i++)
    for (int j = 0; j < 3; j++) g[i][j] = f[u][i][j], f[u][i][j] = -inf;
  for (int i = 0; i <= sz[u]; i++)
    for (int j = 0; j <= sz[v]; j++)
      for (int k = 0; k < 3; k++)
        for (int l = 0; l < 3; l++)
          if (k + l != 3) {
            f[u][i + j][k] = max(f[u][i + j][k], g[i][k] + f[v][j][l]);
          }
  sz[u] += sz[v];
}
void work(int u) {
  int siz, st = cir[1];
  for (int i = 0; i < 3; i++) {
    memset(g, 200, sizeof g);
    siz = sz[st];
    for (int j = 0; j <= siz; j++)
      for (int k = 0; k < 3; k++) g[j][k] = i + k != 3 ? f[st][j][k] : -inf;
    for (int j = 2; j <= cir[0]; j++) {
      int x = cir[j];
      for (int v1 = siz; v1 >= 0; v1--) {
        for (int v2 = 0; v2 < 3; v2++) p[v2] = g[v1][v2], g[v1][v2] = -inf;
        for (int v2 = 0; v2 < 3; v2++)
          for (int v3 = 0; v3 < 3; v3++)
            if (v2 + v3 != 3)
              for (int v4 = 0; v4 <= sz[x]; v4++)
                g[v1 + v4][v3] = max(g[v1 + v4][v3], p[v2] + f[x][v4][v3]);
      }
      siz += sz[x];
    }
    for (int v1 = sz[u]; v1 >= 0; v1--) {
      int val = f[u][v1][i];
      f[u][v1][i] = -inf;
      for (int v2 = 0; v2 < 3; v2++)
        if (v2 + i != 3)
          for (int v3 = 0; v3 <= siz; v3++)
            f[u][v1 + v3][i] = max(f[u][v1 + v3][i], val + g[v3][v2]);
    }
  }
  sz[u] += siz;
}
void dfs(int u) {
  dfn[u] = low[u] = ++num;
  memset(f[u], 200, sizeof f[u]);
  sz[u] = 1, f[u][0][0] = f[u][1][1] = 0, f[u][0][2] = 1;
  for (int v : G[u])
    if (v != fa[u]) {
      if (!dfn[v]) {
        fa[v] = u, dfs(v);
        low[u] = min(low[u], low[v]);
        if (dfn[u] < low[v]) Merge(u, v);
      } else if (dfn[v] == -1) {
        cir[0] = 0;
        for (int x = v; x != u; x = fa[x]) cir[++cir[0]] = x;
        work(u);
      } else
        low[u] = min(low[u], dfn[v]);
    }
  dfn[u] = -1;
}
void solve() {
  n = read(), m = read();
  for (int i = 1; i <= m; i++) {
    int x = read(), y = read();
    G[x].push_back(y);
    G[y].push_back(x);
  }
  dfs(1);
  for (int i = 0; i <= n; i++)
    printf("%d ", max(f[1][i][0], max(f[1][i][1], f[1][i][2])));
}
signed main() { solve(); }
