// includes {{{
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<random>
#include<cassert>
#include<bitset>
#include<cstdlib>
// #include<deque>
// #include<multiset>
// #include<cstring>
// #include<bits/stdc++.h>
// }}}
using namespace std;
using ll = long long;

int f[301][301];
int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(0);
  int n, m;
  cin >> n >> m;
  for(int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    f[a][b] = 1;
  }
  for(int i = 1; i <= n; i++) f[i][i] = 1;
  for(int k = 1; k <= n; k++) {
    for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) {
      f[i][j] |= f[i][k] & f[k][j];
    }
  }
  for(int i = 1; i <= n; i++) {
    vector<int> v;
    for(int j = 1; j <= n; j++) if(f[i][j] and f[j][i]) v.push_back(j);
    for(int k = 0; k < v.size(); k++) cout << v[k] << " \n"[k == v.size() - 1];
  }
  return 0;
}


### Prompt

Please create a solution in Cpp to the following problem:

problem

There are $ N $ propositions, named $ 1, 2, \ cdots, N $, respectively. Also, $ M $ information about the propositions is given. The $ i $ th information is "$ a_i $$". Given in the form "b_i $", which means that $ a_i $ is $ b_i $. ("If" is a logical conditional and the transition law holds.) $ For each proposition $ i $ Output all propositions that have the same value as i $ in ascending order. However, proposition $ i $ and proposition $ i $ are always the same value. Proposition $ X $ and proposition $ Y $ have the same value as "$ if $ X $". It means "Y $" and "$ X $ if $ Y $".



output

On the $ i $ line, output all propositions that have the same value as the proposition $ i $, separated by blanks in ascending order. Also, output a line break at the end of each line.

Example

Input

5 2
1 2
2 1


Output

1 2
1 2
3
4
5

### Response

```cpp
// includes {{{
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<random>
#include<cassert>
#include<bitset>
#include<cstdlib>
// #include<deque>
// #include<multiset>
// #include<cstring>
// #include<bits/stdc++.h>
// }}}
using namespace std;
using ll = long long;

int f[301][301];
int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(0);
  int n, m;
  cin >> n >> m;
  for(int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    f[a][b] = 1;
  }
  for(int i = 1; i <= n; i++) f[i][i] = 1;
  for(int k = 1; k <= n; k++) {
    for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++) {
      f[i][j] |= f[i][k] & f[k][j];
    }
  }
  for(int i = 1; i <= n; i++) {
    vector<int> v;
    for(int j = 1; j <= n; j++) if(f[i][j] and f[j][i]) v.push_back(j);
    for(int k = 0; k < v.size(); k++) cout << v[k] << " \n"[k == v.size() - 1];
  }
  return 0;
}


```