#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MX = 5e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
template <class T>
bool ckmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
namespace input {
template <class T>
void re(complex<T>& x);
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
void re(long double& x) {
  string t;
  re(t);
  x = stold(t);
}
template <class T, class... Ts>
void re(T& t, Ts&... ts) {
  re(t);
  re(ts...);
}
template <class T>
void re(complex<T>& x) {
  T a, b;
  re(a, b);
  x = cd(a, b);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = (0); i < ((int)a.size()); ++i) re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = (0); i < (SZ); ++i) re(a[i]);
}
}  // namespace input
using namespace input;
namespace output {
void pr(int x) { cout << x; }
void pr(long x) { cout << x; }
void pr(long long x) { cout << x; }
void pr(unsigned x) { cout << x; }
void pr(unsigned long x) { cout << x; }
void pr(unsigned long long x) { cout << x; }
void pr(float x) { cout << x; }
void pr(double x) { cout << x; }
void pr(long double x) { cout << x; }
void pr(char x) { cout << x; }
void pr(const char* x) { cout << x; }
void pr(const string& x) { cout << x; }
void pr(bool x) { pr(x ? "true" : "false"); }
template <class T>
void pr(const complex<T>& x) {
  cout << x;
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const T& x);
template <class T, class... Ts>
void pr(const T& t, const Ts&... ts) {
  pr(t);
  pr(ts...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T>
void pr(const T& x) {
  pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? ", " : "", a), fst = 0;
  pr("}");
}
void ps() { pr("\n"); }
template <class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(" ");
  ps(ts...);
}
void pc() { pr("]\n"); }
template <class T, class... Ts>
void pc(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(", ");
  pc(ts...);
}
}  // namespace output
using namespace output;
namespace io {
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void setIO(string second = "") {
  cin.sync_with_stdio(0);
  cin.tie(0);
  if ((int)second.size()) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
}  // namespace io
using namespace io;
typedef decay<decltype(MOD)>::type T;
struct mi {
  T val;
  explicit operator T() const { return val; }
  mi() { val = 0; }
  mi(const long long& v) {
    val = (-MOD <= v && v <= MOD) ? v : v % MOD;
    if (val < 0) val += MOD;
  }
  friend void pr(const mi& a) { pr(a.val); }
  friend void re(mi& a) {
    long long x;
    re(x);
    a = mi(x);
  }
  friend bool operator==(const mi& a, const mi& b) { return a.val == b.val; }
  friend bool operator!=(const mi& a, const mi& b) { return !(a == b); }
  friend bool operator<(const mi& a, const mi& b) { return a.val < b.val; }
  mi operator-() const { return mi(-val); }
  mi& operator+=(const mi& m) {
    if ((val += m.val) >= MOD) val -= MOD;
    return *this;
  }
  mi& operator-=(const mi& m) {
    if ((val -= m.val) < 0) val += MOD;
    return *this;
  }
  mi& operator*=(const mi& m) {
    val = (long long)val * m.val % MOD;
    return *this;
  }
  friend mi pow(mi a, long long p) {
    mi ans = 1;
    assert(p >= 0);
    for (; p; p /= 2, a *= a)
      if (p & 1) ans *= a;
    return ans;
  }
  friend mi inv(const mi& a) {
    assert(a != 0);
    return pow(a, MOD - 2);
  }
  mi& operator/=(const mi& m) { return (*this) *= inv(m); }
  friend mi operator+(mi a, const mi& b) { return a += b; }
  friend mi operator-(mi a, const mi& b) { return a -= b; }
  friend mi operator*(mi a, const mi& b) { return a *= b; }
  friend mi operator/(mi a, const mi& b) { return a /= b; }
};
template <int SZ>
struct BCC {
  int N;
  vector<pair<int, int> > adj[SZ], ed;
  void addEdge(int u, int v) {
    adj[u].push_back({v, (int)ed.size()}),
        adj[v].push_back({u, (int)ed.size()});
    ed.push_back({u, v});
  }
  int disc[SZ];
  vector<int> st;
  vector<vector<int> > bccs;
  int bcc(int u, int p = -1) {
    static int ti = 0;
    disc[u] = ++ti;
    int low = disc[u];
    int child = 0;
    for (auto& i : adj[u])
      if (i.second != p) {
        if (!disc[i.first]) {
          child++;
          st.push_back(i.second);
          int LOW = bcc(i.first, i.second);
          ckmin(low, LOW);
          if (disc[u] <= LOW) {
            bccs.emplace_back();
            vector<int>& tmp = bccs.back();
            for (bool done = 0; !done; tmp.push_back(st.back()), st.pop_back())
              done |= st.back() == i.second;
          }
        } else if (disc[i.first] < disc[u]) {
          ckmin(low, disc[i.first]);
          st.push_back(i.second);
        }
      }
    return low;
  }
  void init(int _N) {
    N = _N;
    for (int i = (0); i < (N); ++i) disc[i] = 0;
    for (int i = (0); i < (N); ++i)
      if (!disc[i]) bcc(i);
  }
};
BCC<MX> B;
int n, m, cnt[MX], label[MX], dp[MX], DP[MX];
vector<pair<int, int> > tmp[MX];
vector<pair<int, int> > v;
int dfs(int x, int y) {
  for (auto& t : tmp[x])
    if (t.second < y) return dfs(t.first, t.second);
  return y;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  re(n, m);
  v.resize(m);
  re(v);
  reverse(begin(v), end(v));
  for (auto& t : v) B.addEdge(t.first, t.second);
  B.init(n + 1);
  for (int i = (0); i < ((int)B.bccs.size()); ++i)
    for (auto& j : B.bccs[i]) label[j] = i;
  for (int i = (1); i < (n + 1); ++i) dp[i] = 1;
  for (int i = (0); i < ((int)v.size()); ++i) {
    int L = label[i];
    cnt[L]++;
    long long sum = dp[v[i].first] + dp[v[i].second];
    if (cnt[L] > 1 && cnt[L] == (int)B.bccs[L].size()) {
      for (auto& t : B.bccs[L])
        if (t != i) {
          int u = B.ed[t].first, v = B.ed[t].second;
          tmp[u].push_back({v, t}), tmp[v].push_back({u, t});
        }
      int a = dfs(v[i].first, MOD);
      int b = dfs(v[i].second, MOD);
      if (a == b) sum -= DP[a];
      for (auto& t : B.bccs[L])
        if (t != i) {
          int u = B.ed[t].first, v = B.ed[t].second;
          tmp[u].clear(), tmp[v].clear();
        }
    }
    dp[v[i].first] = dp[v[i].second] = DP[i] = sum;
  }
  for (int i = (1); i < (n + 1); ++i) pr(dp[i] - 1, ' ');
}

### Prompt

Please formulate a CPP solution to the following problem:

You are given a cactus graph, in this graph each edge lies on at most one simple cycle.

It is given as m edges a_i, b_i, weight of i-th edge is i.

Let's call a path in cactus increasing if the weights of edges on this path are increasing.

Let's call a pair of vertices (u,v) happy if there exists an increasing path that starts in u and ends in v.

For each vertex u find the number of other vertices v, such that pair (u,v) is happy.

Input

The first line of input contains two integers n,m (1 ≤ n, m ≤ 500 000): the number of vertices and edges in the given cactus.

The next m lines contain a description of cactus edges, i-th of them contain two integers a_i, b_i (1 ≤ a_i, b_i ≤ n, a_i ≠ b_i).

It is guaranteed that there are no multiple edges and the graph is connected.

Output

Print n integers, required values for vertices 1,2,…,n.

Examples

Input


3 3
1 2
2 3
3 1


Output


2 2 2 


Input


5 4
1 2
2 3
3 4
4 5


Output


4 4 3 2 1 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MX = 5e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
template <class T>
bool ckmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
namespace input {
template <class T>
void re(complex<T>& x);
template <class T1, class T2>
void re(pair<T1, T2>& p);
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(double& x) {
  string t;
  re(t);
  x = stod(t);
}
void re(long double& x) {
  string t;
  re(t);
  x = stold(t);
}
template <class T, class... Ts>
void re(T& t, Ts&... ts) {
  re(t);
  re(ts...);
}
template <class T>
void re(complex<T>& x) {
  T a, b;
  re(a, b);
  x = cd(a, b);
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = (0); i < ((int)a.size()); ++i) re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = (0); i < (SZ); ++i) re(a[i]);
}
}  // namespace input
using namespace input;
namespace output {
void pr(int x) { cout << x; }
void pr(long x) { cout << x; }
void pr(long long x) { cout << x; }
void pr(unsigned x) { cout << x; }
void pr(unsigned long x) { cout << x; }
void pr(unsigned long long x) { cout << x; }
void pr(float x) { cout << x; }
void pr(double x) { cout << x; }
void pr(long double x) { cout << x; }
void pr(char x) { cout << x; }
void pr(const char* x) { cout << x; }
void pr(const string& x) { cout << x; }
void pr(bool x) { pr(x ? "true" : "false"); }
template <class T>
void pr(const complex<T>& x) {
  cout << x;
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const T& x);
template <class T, class... Ts>
void pr(const T& t, const Ts&... ts) {
  pr(t);
  pr(ts...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("{", x.first, ", ", x.second, "}");
}
template <class T>
void pr(const T& x) {
  pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? ", " : "", a), fst = 0;
  pr("}");
}
void ps() { pr("\n"); }
template <class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(" ");
  ps(ts...);
}
void pc() { pr("]\n"); }
template <class T, class... Ts>
void pc(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(", ");
  pc(ts...);
}
}  // namespace output
using namespace output;
namespace io {
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void setIO(string second = "") {
  cin.sync_with_stdio(0);
  cin.tie(0);
  if ((int)second.size()) {
    setIn(second + ".in"), setOut(second + ".out");
  }
}
}  // namespace io
using namespace io;
typedef decay<decltype(MOD)>::type T;
struct mi {
  T val;
  explicit operator T() const { return val; }
  mi() { val = 0; }
  mi(const long long& v) {
    val = (-MOD <= v && v <= MOD) ? v : v % MOD;
    if (val < 0) val += MOD;
  }
  friend void pr(const mi& a) { pr(a.val); }
  friend void re(mi& a) {
    long long x;
    re(x);
    a = mi(x);
  }
  friend bool operator==(const mi& a, const mi& b) { return a.val == b.val; }
  friend bool operator!=(const mi& a, const mi& b) { return !(a == b); }
  friend bool operator<(const mi& a, const mi& b) { return a.val < b.val; }
  mi operator-() const { return mi(-val); }
  mi& operator+=(const mi& m) {
    if ((val += m.val) >= MOD) val -= MOD;
    return *this;
  }
  mi& operator-=(const mi& m) {
    if ((val -= m.val) < 0) val += MOD;
    return *this;
  }
  mi& operator*=(const mi& m) {
    val = (long long)val * m.val % MOD;
    return *this;
  }
  friend mi pow(mi a, long long p) {
    mi ans = 1;
    assert(p >= 0);
    for (; p; p /= 2, a *= a)
      if (p & 1) ans *= a;
    return ans;
  }
  friend mi inv(const mi& a) {
    assert(a != 0);
    return pow(a, MOD - 2);
  }
  mi& operator/=(const mi& m) { return (*this) *= inv(m); }
  friend mi operator+(mi a, const mi& b) { return a += b; }
  friend mi operator-(mi a, const mi& b) { return a -= b; }
  friend mi operator*(mi a, const mi& b) { return a *= b; }
  friend mi operator/(mi a, const mi& b) { return a /= b; }
};
template <int SZ>
struct BCC {
  int N;
  vector<pair<int, int> > adj[SZ], ed;
  void addEdge(int u, int v) {
    adj[u].push_back({v, (int)ed.size()}),
        adj[v].push_back({u, (int)ed.size()});
    ed.push_back({u, v});
  }
  int disc[SZ];
  vector<int> st;
  vector<vector<int> > bccs;
  int bcc(int u, int p = -1) {
    static int ti = 0;
    disc[u] = ++ti;
    int low = disc[u];
    int child = 0;
    for (auto& i : adj[u])
      if (i.second != p) {
        if (!disc[i.first]) {
          child++;
          st.push_back(i.second);
          int LOW = bcc(i.first, i.second);
          ckmin(low, LOW);
          if (disc[u] <= LOW) {
            bccs.emplace_back();
            vector<int>& tmp = bccs.back();
            for (bool done = 0; !done; tmp.push_back(st.back()), st.pop_back())
              done |= st.back() == i.second;
          }
        } else if (disc[i.first] < disc[u]) {
          ckmin(low, disc[i.first]);
          st.push_back(i.second);
        }
      }
    return low;
  }
  void init(int _N) {
    N = _N;
    for (int i = (0); i < (N); ++i) disc[i] = 0;
    for (int i = (0); i < (N); ++i)
      if (!disc[i]) bcc(i);
  }
};
BCC<MX> B;
int n, m, cnt[MX], label[MX], dp[MX], DP[MX];
vector<pair<int, int> > tmp[MX];
vector<pair<int, int> > v;
int dfs(int x, int y) {
  for (auto& t : tmp[x])
    if (t.second < y) return dfs(t.first, t.second);
  return y;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  re(n, m);
  v.resize(m);
  re(v);
  reverse(begin(v), end(v));
  for (auto& t : v) B.addEdge(t.first, t.second);
  B.init(n + 1);
  for (int i = (0); i < ((int)B.bccs.size()); ++i)
    for (auto& j : B.bccs[i]) label[j] = i;
  for (int i = (1); i < (n + 1); ++i) dp[i] = 1;
  for (int i = (0); i < ((int)v.size()); ++i) {
    int L = label[i];
    cnt[L]++;
    long long sum = dp[v[i].first] + dp[v[i].second];
    if (cnt[L] > 1 && cnt[L] == (int)B.bccs[L].size()) {
      for (auto& t : B.bccs[L])
        if (t != i) {
          int u = B.ed[t].first, v = B.ed[t].second;
          tmp[u].push_back({v, t}), tmp[v].push_back({u, t});
        }
      int a = dfs(v[i].first, MOD);
      int b = dfs(v[i].second, MOD);
      if (a == b) sum -= DP[a];
      for (auto& t : B.bccs[L])
        if (t != i) {
          int u = B.ed[t].first, v = B.ed[t].second;
          tmp[u].clear(), tmp[v].clear();
        }
    }
    dp[v[i].first] = dp[v[i].second] = DP[i] = sum;
  }
  for (int i = (1); i < (n + 1); ++i) pr(dp[i] - 1, ' ');
}

```