Problem: Jack and Jill are tired of the New Year tree, now they've got a New Year cactus at home! A cactus is a connected undirected graph where any two simple cycles have at most one common vertex. In other words, this graph doesn't have any edges that lie on more than one simple cycle.

On the 31st of December they are going to decorate the cactus by hanging toys to its vertices. At most one toy is going to hang on each vertex — it's either the toy Jack hung or the toy Jill hung. It's possible for a vertex to have no toys.

Jack and Jill has been arguing, so they don't want any edge to connect two vertices where one vertex has Jack's toy and the other vertex has Jill's toy.

Jack has decided to hang a toys. What maximum number of toys b can Jill hang if they both cooperate to maximize this value? Your task is to write a program that finds the sought b for all a from 0 to the number of vertices on the New Year Cactus.

Input

The first line contains two integers n and m (1 ≤ n ≤ 2500, n - 1 ≤ m) — the number of vertices and the number of edges, correspondingly. The next m lines contain two integers a, b each (1 ≤ a, b ≤ n, a ≠ b) that mean that there is an edge connecting vertices a и b. Any pair of vertices has at most one edge between them.

Output

The first line must contain space-separated ba (for all 0 ≤ a ≤ n) where ba equals the maximum number of Jill's toys on the cactus considering that it has a Jack's toys. Numbers ba go in the order of increasing a.

Examples

Input

1 0


Output

1 0 


Input

16 20
1 2
3 4
5 6
6 7
7 8
9 10
10 11
11 12
13 14
15 16
1 5
9 13
14 10
10 6
6 2
15 11
11 7
7 3
16 12
8 4


Output

16 13 12 12 10 8 8 7 6 4 4 3 3 1 0 0 0 

Note

The cactus from the second example is:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> v[2510];
int f[2510][3][2510], siz[2510], bel[2510], g[2][3][3][2510], a[5010], b[5010],
    tmp[3][2510];
bool vis[2510];
vector<int> stk;
class cycle {
 public:
  int top;
  vector<int> pt;
} c[5010];
int ccnt = 0;
vector<int> cc[2510];
bool flag[2510][2510], incycle[2510];
int id[2510][2510];
void dfs1(int np, int fath) {
  stk.push_back(np);
  vis[np] = 1;
  for (int &x : v[np]) {
    if (x == fath) continue;
    if (vis[x]) {
      if (flag[x][np]) continue;
      flag[x][np] = flag[np][x] = 1;
      int cur = stk.size() - 1;
      ++ccnt;
      c[ccnt].top = x;
      while (1) {
        c[ccnt].pt.push_back(stk[cur]);
        incycle[stk[cur]] = 1;
        if (stk[cur] == x) break;
        cur--;
      }
      reverse(c[ccnt].pt.begin(), c[ccnt].pt.end());
      for (int i = 0; i + 1 < c[ccnt].pt.size(); i++)
        id[c[ccnt].pt[i]][c[ccnt].pt[i + 1]] =
            id[c[ccnt].pt[i + 1]][c[ccnt].pt[i]] = ccnt;
      id[c[ccnt].pt[0]][c[ccnt].pt.back()] =
          id[c[ccnt].pt.back()][c[ccnt].pt[0]] = ccnt;
      cc[x].push_back(ccnt);
    } else
      dfs1(x, np);
  }
  stk.pop_back();
}
inline void upd(int &x, int y) {
  if (x < y) x = y;
}
void dfs2(int np, int fath, int cid) {
  siz[np] = 1;
  f[np][0][0] = 0;
  f[np][0][1] = -1000000000;
  f[np][1][1] = 0;
  f[np][1][0] = -1000000000;
  f[np][2][0] = 1;
  f[np][2][1] = -1000000000;
  for (int &x : cc[np]) {
    int cur = 0;
    int cs = 0;
    for (int j = 1; j < c[x].pt.size(); j++) dfs2(c[x].pt[j], -1, x);
    for (int a = 0; a < 3; a++)
      for (int b = 0; b < 3; b++) g[cur][a][b][0] = -1000000000;
    g[cur][0][0][0] = 0;
    g[cur][1][1][0] = 0;
    g[cur][2][2][0] = 0;
    for (int j = 1; j < c[x].pt.size(); j++) {
      cur ^= 1;
      for (int a = 0; a < 3; a++)
        for (int b = 0; b < 3; b++)
          fill(g[cur][a][b], g[cur][a][b] + cs + siz[c[x].pt[j]] + 1,
               -1000000000);
      int p = c[x].pt[j];
      for (int a = 0; a <= cs; a++) {
        for (int st = 0; st < 3; st++) {
          for (int lst = 0; lst < 3; lst++) {
            if (g[cur ^ 1][st][lst][a] != -1000000000) {
              for (int now = 0; now < 3; now++) {
                if (lst + now == 3) continue;
                for (int b = 0; b <= siz[c[x].pt[j]]; b++) {
                  if (f[p][now][b] != -1000000000)
                    upd(g[cur][st][now][a + b],
                        g[cur ^ 1][st][lst][a] + f[p][now][b]);
                }
              }
            }
          }
        }
      }
      cs += siz[c[x].pt[j]];
    }
    for (int i = 0; i < 3; i++)
      fill(tmp[i], tmp[i] + siz[np] + cs + 1, -1000000000);
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 3; j++) {
        if (i + j == 3) continue;
        for (int k = 0; k <= siz[np]; k++) {
          if (f[np][i][k] == -1000000000) continue;
          for (int l = 0; l <= cs; l++) {
            if (g[cur][i][j][l] != -1000000000)
              upd(tmp[i][k + l], f[np][i][k] + g[cur][i][j][l]);
          }
        }
      }
    }
    siz[np] += cs;
    for (int i = 0; i < 3; i++) copy(tmp[i], tmp[i] + siz[np] + 1, f[np][i]);
  }
  for (int &x : v[np]) {
    if (id[np][x] != -1) continue;
    if (x == fath) continue;
    dfs2(x, np, -2);
    for (int i = 0; i < 3; i++)
      fill(tmp[i], tmp[i] + siz[np] + siz[x] + 1, -1000000000);
    for (int i = 0; i < 3; i++) {
      for (int a = 0; a <= siz[np]; a++) {
        if (f[np][i][a] == -1000000000) continue;
        for (int j = 0; j < 3; j++) {
          if (i + j == 3) continue;
          for (int b = 0; b <= siz[x]; b++) {
            upd(tmp[i][a + b], f[np][i][a] + f[x][j][b]);
          }
        }
      }
    }
    siz[np] += siz[x];
    for (int i = 0; i < 3; i++) copy(tmp[i], tmp[i] + siz[np] + 1, f[np][i]);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  memset(id, 255, sizeof(id));
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &a[i], &b[i]);
    v[a[i]].push_back(b[i]);
    v[b[i]].push_back(a[i]);
  }
  dfs1(1, 0);
  dfs2(1, 0, -2);
  for (int i = 0; i <= n; i++) {
    int res = 0;
    for (int j = 0; j < 3; j++) upd(res, f[1][j][i]);
    printf("%d ", res);
  }
  return 0;
}