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>
const int sz = 2502, huge = 15000;
int node[sz], next[sz * 4], to[sz * 4], e;
void ins(int x, int y) {
  e++;
  next[e] = node[x];
  node[x] = e;
  to[e] = y;
}
int n, m, I;
int dfn[sz], fa[sz], mo[sz];
void dfs(int x) {
  int y, j, p;
  dfn[x] = ++I;
  for (j = node[x]; j; j = next[j])
    if (j != fa[x])
      if (dfn[to[j]] == 0)
        fa[to[j]] = ((j)&1 ? (j) + 1 : (j)-1), dfs(to[j]);
      else if (dfn[to[j]] < dfn[x])
        for (y = x, p = ((j)&1 ? (j) + 1 : (j)-1); y != to[j];
             y = to[p = fa[y]])
          mo[y] = ((p)&1 ? (p) + 1 : (p)-1);
}
void tens(short &x, short y) {
  if (x < y) x = y;
}
int vis[sz], tmp[sz];
short ft[sz][3];
short f[sz][sz][3], g[sz][sz][3][3];
int siz[sz];
int ttt = 4;
void dp(int x) {
  int y, j, p, a, b, c, d, e, i, s, i2, tag = ++ttt;
  siz[x] = 1;
  f[x][0][2] = 1;
  f[x][0][1] = f[x][0][0] = -huge;
  f[x][1][2] = f[x][1][1] = -huge;
  f[x][1][0] = 0;
  for (j = node[x]; j; j = next[j])
    if (j != fa[x] && j != mo[x])
      if (to[mo[to[j]]] == x)
        for (y = to[j], p = 0; y != x; y = to[fa[y]]) dp(y);
  for (j = node[x]; j; j = next[j])
    if (j != fa[x] && j != mo[x])
      if (to[mo[to[j]]] == x)
        for (y = to[j], p = 0; y != x; y = to[fa[y]]) vis[y] = tag;
  for (j = node[x]; j; j = next[j])
    if (j != fa[x] && j != mo[x])
      if (vis[to[j]] != tag) dp(to[j]);
  for (j = node[x]; j; j = next[j])
    if (j != fa[x] && j != mo[x])
      if (to[mo[to[j]]] == x) {
        for (y = to[j], p = 0; y != x; y = to[fa[y]]) vis[tmp[++p] = y] = tag;
        for (y = 0; y <= siz[tmp[1]]; y++)
          for (c = 0; c < 3; c++)
            for (d = 0; d < 3; d++)
              g[1][y][c][d] = (c == d ? f[tmp[1]][y][c] : -huge);
        s = siz[tmp[1]];
        for (y = 2; y <= p; y++) {
          for (b = 0; b <= s + siz[tmp[y]]; b++)
            for (c = 0; c < 3; c++)
              for (d = 0; d < 3; d++) g[y][b][c][d] = -huge;
          for (a = 0; a <= s; a++)
            for (b = 0; b <= siz[tmp[y]]; b++)
              for (c = 0; c < 3; c++)
                for (d = 0; d < 3; d++)
                  for (e = 0; e < 3; e++) {
                    int ff = g[y - 1][a][c][d] + f[tmp[y]][b][e];
                    if (!(((d) != 2 || (e) != 0) && ((d) != 0 || (e) != 2))) {
                      if (e == 2)
                        i = 1;
                      else
                        i = e;
                      ff--;
                    } else
                      i = e;
                    i2 = c;
                    if (y == 2 && d == 2 && e == 0) i2 = 1;
                    tens(g[y][a + b][i2][i], ff);
                  }
          s += siz[tmp[y]];
        }
        for (a = 0; a <= siz[x] + s; a++)
          for (c = 0; c < 3; c++) ft[a][c] = -huge;
        for (a = 0; a <= s; a++)
          for (b = 0; b <= siz[x]; b++)
            for (c = 0; c < 3; c++)
              for (d = 0; d < 3; d++)
                for (e = 0; e < 3; e++) {
                  int ff = g[p][a][c][e] + f[x][b][d];
                  if (!(((c) != 2 || (d) != 0) && ((c) != 0 || (d) != 2)) ||
                      !(((e) != 2 || (d) != 0) && ((e) != 0 || (d) != 2))) {
                    if (d == 2)
                      i = 1;
                    else
                      i = d;
                    ff--;
                  } else
                    i = d;
                  if (c == 2 && e == 2 && d == 0) ff--;
                  if (ff == -1) ff = 0;
                  tens(ft[a + b][i], ff);
                }
        siz[x] += s;
        for (a = 0; a <= siz[x]; a++)
          for (c = 0; c < 3; c++) f[x][a][c] = ft[a][c];
      }
  for (j = node[x]; j; j = next[j])
    if (j != fa[x] && j != mo[x])
      if (vis[to[j]] != tag) {
        for (a = 0; a <= siz[x] + siz[to[j]]; a++)
          for (c = 0; c < 3; c++) ft[a][c] = -huge;
        for (a = 0; a <= siz[x]; a++)
          for (b = 0; b <= siz[to[j]]; b++)
            for (c = 0; c < 3; c++)
              for (d = 0; d < 3; d++) {
                int ff = f[x][a][c] + f[to[j]][b][d];
                if (!(((c) != 2 || (d) != 0) && ((c) != 0 || (d) != 2))) {
                  if (c == 2)
                    e = 1;
                  else
                    e = c;
                  ff--;
                } else
                  e = c;
                tens(ft[a + b][e], ff);
              }
        siz[x] += siz[to[j]];
        for (a = 0; a <= siz[x]; a++)
          for (c = 0; c < 3; c++) f[x][a][c] = ft[a][c];
      }
}
int main() {
  scanf("%d %d\n", &n, &m);
  while (m--) {
    int x, y;
    scanf("%d %d", &x, &y);
    ins(x, y);
    ins(y, x);
  }
  dfs(1);
  dp(1);
  for (int i = 0; i <= n; i++) {
    tens(f[1][i][0], f[1][i][1]);
    tens(f[1][i][0], f[1][i][2]);
    printf("%d ", f[1][i][0]);
  }
  return 0;
}