#include <bits/stdc++.h>
inline int min(const int &first, const int &second) {
  return (((second - first) >> (32 - 1)) & (first ^ second)) ^ first;
}
inline int max(const int &first, const int &second) {
  return (((second - first) >> (32 - 1)) & (first ^ second)) ^ second;
}
inline long long min(const long long &first, const long long &second) {
  return (((second - first) >> (64 - 1)) & (first ^ second)) ^ first;
}
inline long long max(const long long &first, const long long &second) {
  return (((second - first) >> (64 - 1)) & (first ^ second)) ^ second;
}
using namespace std;
char string_in_buffer[(int)260];
void fast_scan(int &first) { scanf("%d", &first); }
void fast_scan(long long &first) { scanf("%lld", &first); }
void fast_scan(unsigned long long &first) { scanf("%llu", &first); }
void fast_scan(double &first) { scanf("%lf", &first); }
void fast_scan(long double &first) { scanf("%Lf", &first); }
void fast_scan(char &first) {
  scanf("%c", &first);
  if (first == '\n') {
    fast_scan(first);
  }
}
void fast_scan(string &first) {
  scanf("%s", string_in_buffer);
  first = string(string_in_buffer);
}
template <class TFirst, class TSecond>
void fast_scan(pair<TFirst, TSecond> &p) {
  fast_scan(p.first);
  fast_scan(p.second);
}
template <class T>
void fast_scan(vector<T> &v) {
  for (auto &first : v) fast_scan(first);
}
void fast_print(const int &first) { printf("%d", first); }
void fast_print(const unsigned int &first) { printf("%u", first); }
void fast_print(const long long &first) { printf("%lld", first); }
void fast_print(const unsigned long long &first) { printf("%llu", first); }
void fast_print(const char &first) { printf("%c", first); };
void fast_print(const double &first) { printf("%.15lf", first); }
void fast_print(const long double &first) { printf("%.15Lf", first); }
void fast_print(const string &first) { printf("%s", first.c_str()); }
void fast_print(const char v[]) { fast_print((string)v); }
template <class TFirst, class TSecond>
void fast_print(const pair<TFirst, TSecond> &p) {
  fast_print(p.first);
  fast_print(' ');
  fast_print(p.second);
}
template <class T>
void fast_print(const vector<T> &v) {
  if (v.empty()) return;
  fast_print(v[0]);
  for (int i = 1; i < v.size(); i++) {
    fast_print(' ');
    fast_print(v[i]);
  }
}
template <class T>
void fast_print(const vector<vector<T>> &v) {
  if (v.empty()) return;
  fast_print(v[0]);
  for (int i = 1; i < v.size(); i++) {
    fast_print('\n');
    fast_print(v[i]);
  }
}
template <class T>
void fast_print(const T &v) {
  for (const auto &first : v) {
    fast_print(first);
    fast_print(' ');
  }
}
using namespace std;
namespace smart_io {
string print_start = "";
string sep = " ";
bool first_print = false;
void precall_print() {
  fast_print(print_start);
  print_start = "\n";
  first_print = true;
}
void _print(deque<string>) {}
template <class T, class... Args>
void _print(deque<string> names, T elem, Args... args) {
  if (!first_print) {
    fast_print("\n");
  } else {
    first_print = false;
  }
  fast_print(names.front());
  fast_print(" = ");
  fast_print(elem);
  names.pop_front();
  _print(names, args...);
}
}  // namespace smart_io
template <class T>
ostream &operator,(ostream &os, const T &object) {
  if (!smart_io::first_print) {
    fast_print(smart_io::sep);
  } else {
    smart_io::first_print = false;
  }
  fast_print(object);
  return os;
}
template <class T>
istream &operator,(istream &is, T &object) {
  fast_scan(object);
  return is;
}
namespace escape__from__random__aetuhoetnuhshe {
using namespace std::chrono;
mt19937 rng(duration_cast<milliseconds>(system_clock::now().time_since_epoch())
                .count());
uniform_real_distribution<> prob_dist(0.0, 1.0);
};  // namespace escape__from__random__aetuhoetnuhshe
namespace typedefs {}
namespace numbers_operation {
template <class T>
inline T floor_mod(T a, const T &b) {
  a %= b;
  if (a < 0) a += b;
  return a;
}
}  // namespace numbers_operation
using namespace numbers_operation;
using namespace typedefs;
using namespace escape__from__random__aetuhoetnuhshe;
int n, m;
vector<vector<pair<int, int>>> g;
vector<int> color;
vector<int> dom;
vector<pair<int, int>> st;
void dfs(int v, int _p) {
  color[v] = 1;
  for (pair<int, int> p : g[v]) {
    if (p.first == _p) continue;
    if (color[p.first] == 2) continue;
    if (color[p.first] == 0) {
      st.push_back(p);
      dfs(p.first, v);
      st.pop_back();
    } else {
      vector<pair<int, int>> cycle{p};
      for (int i = ((int)st.size()) - 1; ~i && st[i].first != p.first; i--) {
        cycle.push_back(st[i]);
      }
      int _max = 0;
      for (int i = 0; i < ((int)cycle.size()); i++)
        if (cycle[i].second > cycle[_max].second) _max = i;
      rotate(cycle.begin(), cycle.begin() + _max, cycle.end());
      int D = cycle[0].second;
      cycle.erase(cycle.begin());
      vector<bool> okLeft(((int)cycle.size()), false);
      vector<bool> okRight(((int)cycle.size()), false);
      okLeft[0] = true;
      for (int i = 1; i < ((int)cycle.size()); i++)
        okLeft[i] = (okLeft[i - 1] && cycle[i - 1].second > cycle[i].second);
      okRight[((int)cycle.size()) - 1] = true;
      for (int i = ((int)cycle.size()) - 2; ~i; i--)
        okRight[i] = (okRight[i + 1] && cycle[i + 1].second > cycle[i].second);
      for (int i = 0; i < ((int)cycle.size()); i++) {
        if (okLeft[i] && okRight[i]) {
          dom[cycle[i].second] = D;
        }
      }
    }
  }
  color[v] = 2;
}
signed main(signed argc, char *argv[]) {
  cin, n, m;
  dom.resize(m, -1);
  g.resize(n);
  vector<pair<int, int>> edges;
  for (int i = 0; i < (m); i++) {
    int a, b;
    cin, a, b;
    a--;
    b--;
    edges.emplace_back(a, b);
    g[a].emplace_back(b, i);
    g[b].emplace_back(a, i);
  }
  color.resize(n, 0);
  dfs(0, -1);
  vector<int> ways;
  vector<int> dpVertex(n, 1);
  vector<int> dpEdge(m);
  for (int i = ((int)edges.size()) - 1; ~i; i--) {
    int a = edges[i].first, b = edges[i].second;
    dpEdge[i] = dpVertex[a] + dpVertex[b];
    if (dom[i] != -1) {
      dpEdge[i] -= dpEdge[dom[i]];
    }
    dpVertex[a] = dpVertex[b] = dpEdge[i];
  }
  for (auto &first : dpVertex) {
    first--;
  }
  smart_io::precall_print();
  cout, dpVertex;
}

### Prompt

Construct a cpp code solution to the problem outlined:

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>
inline int min(const int &first, const int &second) {
  return (((second - first) >> (32 - 1)) & (first ^ second)) ^ first;
}
inline int max(const int &first, const int &second) {
  return (((second - first) >> (32 - 1)) & (first ^ second)) ^ second;
}
inline long long min(const long long &first, const long long &second) {
  return (((second - first) >> (64 - 1)) & (first ^ second)) ^ first;
}
inline long long max(const long long &first, const long long &second) {
  return (((second - first) >> (64 - 1)) & (first ^ second)) ^ second;
}
using namespace std;
char string_in_buffer[(int)260];
void fast_scan(int &first) { scanf("%d", &first); }
void fast_scan(long long &first) { scanf("%lld", &first); }
void fast_scan(unsigned long long &first) { scanf("%llu", &first); }
void fast_scan(double &first) { scanf("%lf", &first); }
void fast_scan(long double &first) { scanf("%Lf", &first); }
void fast_scan(char &first) {
  scanf("%c", &first);
  if (first == '\n') {
    fast_scan(first);
  }
}
void fast_scan(string &first) {
  scanf("%s", string_in_buffer);
  first = string(string_in_buffer);
}
template <class TFirst, class TSecond>
void fast_scan(pair<TFirst, TSecond> &p) {
  fast_scan(p.first);
  fast_scan(p.second);
}
template <class T>
void fast_scan(vector<T> &v) {
  for (auto &first : v) fast_scan(first);
}
void fast_print(const int &first) { printf("%d", first); }
void fast_print(const unsigned int &first) { printf("%u", first); }
void fast_print(const long long &first) { printf("%lld", first); }
void fast_print(const unsigned long long &first) { printf("%llu", first); }
void fast_print(const char &first) { printf("%c", first); };
void fast_print(const double &first) { printf("%.15lf", first); }
void fast_print(const long double &first) { printf("%.15Lf", first); }
void fast_print(const string &first) { printf("%s", first.c_str()); }
void fast_print(const char v[]) { fast_print((string)v); }
template <class TFirst, class TSecond>
void fast_print(const pair<TFirst, TSecond> &p) {
  fast_print(p.first);
  fast_print(' ');
  fast_print(p.second);
}
template <class T>
void fast_print(const vector<T> &v) {
  if (v.empty()) return;
  fast_print(v[0]);
  for (int i = 1; i < v.size(); i++) {
    fast_print(' ');
    fast_print(v[i]);
  }
}
template <class T>
void fast_print(const vector<vector<T>> &v) {
  if (v.empty()) return;
  fast_print(v[0]);
  for (int i = 1; i < v.size(); i++) {
    fast_print('\n');
    fast_print(v[i]);
  }
}
template <class T>
void fast_print(const T &v) {
  for (const auto &first : v) {
    fast_print(first);
    fast_print(' ');
  }
}
using namespace std;
namespace smart_io {
string print_start = "";
string sep = " ";
bool first_print = false;
void precall_print() {
  fast_print(print_start);
  print_start = "\n";
  first_print = true;
}
void _print(deque<string>) {}
template <class T, class... Args>
void _print(deque<string> names, T elem, Args... args) {
  if (!first_print) {
    fast_print("\n");
  } else {
    first_print = false;
  }
  fast_print(names.front());
  fast_print(" = ");
  fast_print(elem);
  names.pop_front();
  _print(names, args...);
}
}  // namespace smart_io
template <class T>
ostream &operator,(ostream &os, const T &object) {
  if (!smart_io::first_print) {
    fast_print(smart_io::sep);
  } else {
    smart_io::first_print = false;
  }
  fast_print(object);
  return os;
}
template <class T>
istream &operator,(istream &is, T &object) {
  fast_scan(object);
  return is;
}
namespace escape__from__random__aetuhoetnuhshe {
using namespace std::chrono;
mt19937 rng(duration_cast<milliseconds>(system_clock::now().time_since_epoch())
                .count());
uniform_real_distribution<> prob_dist(0.0, 1.0);
};  // namespace escape__from__random__aetuhoetnuhshe
namespace typedefs {}
namespace numbers_operation {
template <class T>
inline T floor_mod(T a, const T &b) {
  a %= b;
  if (a < 0) a += b;
  return a;
}
}  // namespace numbers_operation
using namespace numbers_operation;
using namespace typedefs;
using namespace escape__from__random__aetuhoetnuhshe;
int n, m;
vector<vector<pair<int, int>>> g;
vector<int> color;
vector<int> dom;
vector<pair<int, int>> st;
void dfs(int v, int _p) {
  color[v] = 1;
  for (pair<int, int> p : g[v]) {
    if (p.first == _p) continue;
    if (color[p.first] == 2) continue;
    if (color[p.first] == 0) {
      st.push_back(p);
      dfs(p.first, v);
      st.pop_back();
    } else {
      vector<pair<int, int>> cycle{p};
      for (int i = ((int)st.size()) - 1; ~i && st[i].first != p.first; i--) {
        cycle.push_back(st[i]);
      }
      int _max = 0;
      for (int i = 0; i < ((int)cycle.size()); i++)
        if (cycle[i].second > cycle[_max].second) _max = i;
      rotate(cycle.begin(), cycle.begin() + _max, cycle.end());
      int D = cycle[0].second;
      cycle.erase(cycle.begin());
      vector<bool> okLeft(((int)cycle.size()), false);
      vector<bool> okRight(((int)cycle.size()), false);
      okLeft[0] = true;
      for (int i = 1; i < ((int)cycle.size()); i++)
        okLeft[i] = (okLeft[i - 1] && cycle[i - 1].second > cycle[i].second);
      okRight[((int)cycle.size()) - 1] = true;
      for (int i = ((int)cycle.size()) - 2; ~i; i--)
        okRight[i] = (okRight[i + 1] && cycle[i + 1].second > cycle[i].second);
      for (int i = 0; i < ((int)cycle.size()); i++) {
        if (okLeft[i] && okRight[i]) {
          dom[cycle[i].second] = D;
        }
      }
    }
  }
  color[v] = 2;
}
signed main(signed argc, char *argv[]) {
  cin, n, m;
  dom.resize(m, -1);
  g.resize(n);
  vector<pair<int, int>> edges;
  for (int i = 0; i < (m); i++) {
    int a, b;
    cin, a, b;
    a--;
    b--;
    edges.emplace_back(a, b);
    g[a].emplace_back(b, i);
    g[b].emplace_back(a, i);
  }
  color.resize(n, 0);
  dfs(0, -1);
  vector<int> ways;
  vector<int> dpVertex(n, 1);
  vector<int> dpEdge(m);
  for (int i = ((int)edges.size()) - 1; ~i; i--) {
    int a = edges[i].first, b = edges[i].second;
    dpEdge[i] = dpVertex[a] + dpVertex[b];
    if (dom[i] != -1) {
      dpEdge[i] -= dpEdge[dom[i]];
    }
    dpVertex[a] = dpVertex[b] = dpEdge[i];
  }
  for (auto &first : dpVertex) {
    first--;
  }
  smart_io::precall_print();
  cout, dpVertex;
}

```