#include <bits/stdc++.h>
using namespace std;
const int N = 2505;
int n, m, nd, S[N];
int dep[N], fa[N * 2];
vector<int> e[N], E[N * 2];
int f[N][N][3];
int tmp[N][3], sz[N];
void UPD(int &x, int y) { x < y ? x = y : 233; }
void dfs(int x) {
  dep[x] = dep[fa[x]] + 1;
  for (auto i : e[x])
    if (!dep[i]) {
      fa[i] = x;
      dfs(i);
      S[x] += S[i];
      if (!S[i]) {
        E[x].push_back(i);
        E[i].push_back(x);
      }
    } else if (dep[i] < dep[x] && i != fa[x]) {
      ++nd;
      ++S[x];
      --S[i];
      for (int y = x;; y = fa[y]) {
        E[nd].push_back(y);
        E[y].push_back(nd);
        if (y == i) break;
      }
    }
}
void merge0(int x, int y) {
  memset(tmp, 233, sizeof(tmp));
  for (int i = (int)(0); i <= (int)(sz[x]); i++)
    for (int j = (int)(0); j <= (int)(sz[y]); j++)
      for (int c1 = (int)(0); c1 <= (int)(2); c1++)
        for (int c2 = (int)(0); c2 <= (int)(2); c2++)
          if ((c1 != 0 || c2 != 2) && (c1 != 2 || c2 != 0))
            UPD(tmp[i + j][c2], f[x][i][c1] + f[y][j][c2]);
  sz[x] += sz[y];
  for (int i = (int)(0); i <= (int)(sz[x]); i++)
    for (int c1 = (int)(0); c1 <= (int)(2); c1++) f[x][i][c1] = tmp[i][c1];
}
void merge1(int x, int y) {
  memset(tmp, 233, sizeof(tmp));
  for (int i = (int)(0); i <= (int)(sz[x]); i++)
    for (int j = (int)(0); j <= (int)(sz[y]); j++)
      for (int c1 = (int)(0); c1 <= (int)(2); c1++)
        for (int c2 = (int)(0); c2 <= (int)(2); c2++)
          if ((c1 != 0 || c2 != 2) && (c1 != 2 || c2 != 0))
            UPD(tmp[i + j][c1], f[x][i][c1] + f[y][j][c2]);
  sz[x] += sz[y];
  for (int i = (int)(0); i <= (int)(sz[x]); i++)
    for (int c1 = (int)(0); c1 <= (int)(2); c1++) f[x][i][c1] = tmp[i][c1];
}
void merge2(int x, int y) {
  memset(f[n + 2], 233, sizeof(f[n + 2]));
  for (int c1 = (int)(0); c1 <= (int)(2); c1++) {
    sz[n + 1] = sz[x];
    memset(f[n + 1], 233, sizeof(f[n + 1]));
    for (int j = (int)(0); j <= (int)(sz[x]); j++)
      f[n + 1][j][c1] = f[x][j][c1];
    for (auto j : E[y])
      if (j != x) merge0(n + 1, j);
    for (int c2 = (int)(0); c2 <= (int)(2); c2++)
      if ((c1 != 0 || c2 != 2) && (c1 != 2 || c2 != 0))
        for (int j = (int)(0); j <= (int)(sz[n + 1]); j++)
          UPD(f[n + 2][j][c1], f[n + 1][j][c2]);
  }
  sz[x] = sz[n + 1];
  memcpy(f[x], f[n + 2], sizeof(f[x]));
}
void DP(int x) {
  for (auto i : E[x])
    if (i != fa[x]) {
      fa[i] = x;
      DP(i);
    }
  if (x <= n) {
    sz[x] = 1;
    f[x][0][0] = 1;
    f[x][0][1] = 0;
    f[x][1][2] = 0;
    for (auto i : E[x])
      if (i != fa[x])
        if (i <= n)
          merge1(x, i);
        else
          merge2(x, i);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (int)(1); i <= (int)(m); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  nd = n;
  dfs(1);
  memset(fa, 0, sizeof(fa));
  memset(f, 233, sizeof(f));
  DP(1);
  for (int i = (int)(0); i <= (int)(n); i++) {
    int v = 0;
    for (int j = (int)(0); j <= (int)(2); j++) UPD(v, f[1][i][j]);
    printf("%d ", v);
  }
}
