#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int inf = 10000000;
struct dp {
  int size;
  int f[2510][3];
  int *operator[](int x) { return f[x]; }
  const int *operator[](int x) const { return f[x]; }
} f[2510];
int dfn[2510], low[2510], tim, trans[3][3], fa[2510], loop[2510], tot, n, m;
vector<int> E[2510];
void Max(int &x, int y) { x = max(x, y); }
void renew(dp &a, dp &b) {
  for (int i = 0; i <= 2; ++i) {
    for (int j = a.size; j >= 0; --j) {
      int val = a[j][i];
      a[j][i] = -inf;
      for (int u = 0; u <= 2; ++u)
        if (i + u != 3)
          for (int v = 0; v <= b.size; ++v) Max(a[j + v][i], val + b[v][u]);
    }
  }
  a.size += b.size;
}
void work(int x) {
  dp tmp;
  int s;
  for (int i = 0; i <= 2; ++i) {
    int o = loop[1];
    memset(tmp.f, 250, sizeof(tmp.f));
    tmp.size = f[o].size;
    for (int j = 0; j <= tmp.size; ++j)
      for (int k = 0; k <= 2; ++k) {
        if (k + i != 3)
          tmp[j][k] = f[o][j][k];
        else
          tmp[j][k] = -inf;
      }
    for (int j = 2; j <= tot; ++j) {
      int y = loop[j];
      int p[3];
      for (int p1 = tmp.size; p1 >= 0; --p1) {
        for (int p2 = 0; p2 <= 2; ++p2) p[p2] = tmp[p1][p2], tmp[p1][p2] = -inf;
        for (int p2 = 0; p2 <= 2; ++p2)
          for (int q2 = 0; q2 <= 2; ++q2)
            if (p2 + q2 != 3)
              for (int q1 = 0; q1 <= f[y].size; ++q1)
                Max(tmp[p1 + q1][q2], p[p2] + f[y][q1][q2]);
      }
      tmp.size += f[y].size;
    }
    s = tmp.size;
    for (int k = f[x].size; k >= 0; --k) {
      int val = f[x][k][i];
      f[x][k][i] = -inf;
      for (int u = 0; u <= 2; ++u)
        if (u + i != 3)
          for (int v = 0; v <= s; ++v) Max(f[x][k + v][i], val + tmp[v][u]);
    }
  }
  f[x].size += s;
}
void dfs(int x, int ff) {
  dfn[x] = low[x] = ++tim;
  memset(f[x].f, 250, sizeof(f[x].f));
  f[x].size = 1;
  f[x][0][0] = 0;
  f[x][1][1] = 0;
  f[x][0][2] = 1;
  for (int i = 0; i < E[x].size(); ++i)
    if (E[x][i] != ff) {
      if (dfn[E[x][i]] == -1) {
        tot = 0;
        for (int j = E[x][i]; j != x; j = fa[j]) loop[++tot] = j;
        work(x);
      } else if (!dfn[E[x][i]]) {
        fa[E[x][i]] = x;
        dfs(E[x][i], x);
        low[x] = min(low[x], low[E[x][i]]);
        if (low[E[x][i]] > dfn[x]) renew(f[x], f[E[x][i]]);
      } else
        low[x] = min(low[x], dfn[E[x][i]]);
    }
  dfn[x] = -1;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    E[x].push_back(y);
    E[y].push_back(x);
  }
  dfs(1, 0);
  for (int i = 0; i <= n; ++i)
    printf("%d ", max(f[1][i][0], max(f[1][i][1], f[1][i][2])));
}
