#include <bits/stdc++.h>
const int MAXN = 2500;
int size[MAXN], pre[MAXN], cycle[MAXN];
std ::vector<int> graph[MAXN], child[MAXN];
int dp[MAXN][MAXN + 1][3][3];
int temp[MAXN + 1][3][3];
void update(int &x, int y) {
  if (x < y) x = y;
}
bool check(int u, int up, int uq, int v, int vp, int vq) {
  if (-1 != cycle[u] && cycle[u] == cycle[v])
    return uq == vq;
  else if (cycle[v] == u)
    return up + vq != 3;
  else
    return true;
}
void dfs(int u) {
  size[u] = 1;
  bool bottom = false;
  for (int v : graph[u]) {
    if (v != pre[u]) {
      if (0 == size[v]) {
        child[u].push_back(v);
        pre[v] = u;
        dfs(v);
        size[u] += size[v];
      } else if (cycle[v] != u) {
        bottom = true;
        for (int i = u; i != v; i = pre[i]) cycle[i] = v;
      }
    }
  }
  for (int i = 0; i <= size[u]; ++i)
    for (int p = 0; p < 3; ++p)
      for (int q = 0; q < 3; ++q) dp[u][i][p][q] = -1;
  int now = 1;
  if (bottom) {
    dp[u][0][0][0] = 0;
    dp[u][1][1][1] = 0;
    dp[u][0][2][2] = 1;
  } else
    for (int q = 0; q < 3; ++q) {
      dp[u][0][0][q] = 0;
      dp[u][1][1][q] = 0;
      dp[u][0][2][q] = 1;
    }
  for (int v : child[u]) {
    for (int i = 0; i <= now + size[v]; ++i)
      for (int p = 0; p < 3; ++p)
        for (int q = 0; q < 3; ++q) temp[i][p][q] = -1;
    for (int vi = 0; vi <= size[v]; ++vi)
      for (int vp = 0; vp < 3; ++vp)
        for (int vq = 0; vq < 3; ++vq)
          if (-1 != dp[v][vi][vp][vq])
            for (int ui = 0; ui <= now; ++ui)
              for (int up = 0; up < 3; ++up)
                if (3 != up + vp)
                  for (int uq = 0; uq < 3; ++uq)
                    if (-1 != dp[u][ui][up][uq] && check(u, up, uq, v, vp, vq))
                      update(temp[ui + vi][up][uq],
                             dp[u][ui][up][uq] + dp[v][vi][vp][vq]);
    now += size[v];
    for (int i = 0; i <= now; ++i)
      for (int p = 0; p < 3; ++p)
        for (int q = 0; q < 3; ++q) dp[u][i][p][q] = temp[i][p][q];
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    graph[u - 1].push_back(v - 1);
    graph[v - 1].push_back(u - 1);
  }
  memset(cycle, -1, 4 * n);
  pre[0] = -1;
  dfs(0);
  for (int i = 0; i <= n; ++i) {
    int ans = 0;
    for (int p = 0; p < 3; ++p)
      for (int q = 0; q < 3; ++q) update(ans, dp[0][i][p][q]);
    printf("%d ", ans);
  }
  puts("");
  return 0;
}
