#include <bits/stdc++.h>
using namespace std;
const int maxn = 2510;
int p[maxn], sz[maxn], cycle[maxn], f[maxn][maxn][3][3], g[maxn][3][3];
vector<int> child[maxn], graph[maxn];
void fresh(int &x, int y) {
  if (y > x) x = y;
}
void dfs(int t) {
  int bottom = 0;
  sz[t] = 1;
  for (int i = 0; i < graph[t].size(); i++) {
    int k = graph[t][i];
    if (k != p[t]) {
      if (sz[k] == 0) {
        child[t].push_back(k);
        p[k] = t;
        dfs(k);
        sz[t] += sz[k];
      } else if (cycle[k] != t) {
        bottom = 1;
        for (int j = t; j != k; j = p[j]) cycle[j] = k;
      }
    }
  }
  for (int i = 0; i <= sz[t]; i++)
    for (int u = 0; u < 3; u++)
      for (int v = 0; v < 3; v++) f[t][i][u][v] = -1;
  int m = 1;
  if (bottom || cycle[t] == -1) {
    f[t][0][0][0] = 0;
    f[t][0][2][2] = 1;
    f[t][1][1][1] = 0;
  } else if (cycle[t] != -1) {
    for (int o = 0; o < child[t].size(); o++) {
      int k = child[t][o];
      if (cycle[k] != cycle[t]) continue;
      m = sz[k] + 1;
      for (int i = 0; i <= sz[k]; i++)
        for (int u = 0; u < 3; u++)
          for (int v = 0; v < 3; v++)
            if (f[k][i][u][v] != -1) {
              fresh(f[t][i][0][v], f[k][i][u][v]);
              if (u != 2) fresh(f[t][i + 1][1][v], f[k][i][u][v]);
              if (u != 1) fresh(f[t][i][2][v], f[k][i][u][v] + 1);
            }
    }
  }
  for (int o = 0; o < child[t].size(); o++) {
    int k = child[t][o];
    if (cycle[t] != -1 && cycle[k] == cycle[t]) continue;
    int M = m + sz[k];
    for (int i = 0; i <= M; i++)
      for (int u = 0; u < 3; u++)
        for (int v = 0; v < 3; v++) g[i][u][v] = -1;
    for (int i = 0; i <= m; i++)
      for (int u = 0; u < 3; u++)
        for (int v = 0; v < 3; v++)
          if (f[t][i][u][v] != -1)
            for (int ii = 0; ii <= sz[k]; ii++)
              for (int uu = 0; uu < 3; uu++)
                for (int vv = 0; vv < 3; vv++)
                  if (f[k][ii][uu][vv] != -1) {
                    if (u + uu == 3) continue;
                    if (cycle[k] == t && u + vv == 3) continue;
                    fresh(g[i + ii][u][v], f[t][i][u][v] + f[k][ii][uu][vv]);
                  }
    for (int i = 0; i <= M; i++)
      for (int u = 0; u < 3; u++)
        for (int v = 0; v < 3; v++) f[t][i][u][v] = g[i][u][v];
    m = M;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  p[0] = -1;
  memset(sz, 0, sizeof(sz));
  memset(cycle, -1, sizeof(cycle));
  dfs(0);
  for (int i = 0; i <= n; i++) {
    int res = 0;
    for (int u = 0; u < 3; u++)
      for (int v = 0; v < 3; v++) res = max(res, f[0][i][u][v]);
    cout << res;
    i == n ? cout << endl : cout << ' ';
  }
  return 0;
}
