#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2500;
const int INF = 0x3f3f3f3f;
const int MAXM = MAXN * 2;
struct node {
  int v;
  node *next;
} Edges[MAXM * 2 + 10], *ecnt = Edges, *adj[MAXN + 10];
void addedge(int u, int v) {
  ++ecnt;
  ecnt->v = v;
  ecnt->next = adj[u];
  adj[u] = ecnt;
}
int dfn[MAXN + 10], dcnt, low[MAXN + 10], dp[MAXN + 10][MAXN + 10][3][3],
    sz[MAXN + 10];
void dfs(int u, int fa) {
  sz[u] = 1;
  dfn[u] = low[u] = ++dcnt;
  dp[u][0][2][0] = 1;
  dp[u][0][0][0] = dp[u][1][1][0] = 0;
  for (node *p = adj[u]; p; p = p->next) {
    if (p->v != fa && dfn[p->v] < dfn[u]) {
      if (!dfn[p->v]) {
        dfs(p->v, u);
        low[u] = min(low[u], low[p->v]);
        sz[u] += sz[p->v];
        for (int i = sz[u]; i >= 0; i--) {
          for (int col = 0; col < 3; col++) {
            for (int col1 = 2; col1 >= 0; col1--) {
              int mx = -INF;
              for (int b = max(0, i - (sz[u] - sz[p->v]));
                   b <= min(i, sz[p->v]); b++)
                for (int col2 = 0; col2 < 3; col2++) {
                  if (col + col2 == 3) continue;
                  if (low[p->v] == dfn[u])
                    mx = max(mx,
                             dp[u][i - b][col][col1] + dp[p->v][b][col2][col]);
                  else if (low[p->v] < dfn[u])
                    mx =
                        max(mx, dp[u][i - b][col][0] + dp[p->v][b][col2][col1]);
                  else
                    mx =
                        max(mx, dp[u][i - b][col][col1] + dp[p->v][b][col2][0]);
                }
              dp[u][i][col][col1] = mx;
            }
          }
        }
      } else {
        low[u] = dfn[p->v];
        for (int i = 0; i <= sz[u]; i++) {
          dp[u][i][0][1] = dp[u][i][0][2] = dp[u][i][0][0];
          dp[u][i][1][2] = -INF;
          dp[u][i][1][1] = dp[u][i][1][0];
          dp[u][i][2][2] = dp[u][i][2][0];
        }
      }
    }
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int i, u, v;
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
    addedge(v, u);
  }
  memset(dp, 0xc0, sizeof dp);
  dfs(1, 0);
  for (i = 0; i <= n; i++) {
    int ans = 0;
    for (int j = 0; j < 3; j++) ans = max(ans, dp[1][i][j][0]);
    printf("%d ", ans);
  }
  return 0;
}
