output_description: Print 1+K lines, where K is the number of strongly connected components. Print
  K on the first line. Print the information of each strongly connected
  component in next K lines in the following format, where l is the number of
  vertices in the strongly connected component and v_i is the index of the
  vertex in it.
  
      
      
      l v_0 v_1 ... v_{l-1}
      
  
  Here, for each edge (a_i, b_i), b_i should not appear in **earlier** line than
  a_i.
  
  If there are multiple correct output, print any of them.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      a_0 b_0
      a_1 b_1
      :
      a_{M - 1} b_{M - 1}
attempt: N, M = map(int, input().split())
  A = list(map(int, input().split()))
  B = list(map(int, input().split()))
  MOD = 998244353
  
  
  class Convolution:
      def __init__(self):
          self.first = True
  
      def _ceil_pow2(self, n):
          assert n >= 0
          x = 0
          while (1 << x) < n:
              x += 1
          return x
  
      def _bsf(self, n):
          assert n >= 1
          return len(bin(n & -n)) - 3
  
      def _butterfly(self, a, mod):
          n = len(a)
          h = self._ceil_pow2(n)
          self.sum_e = [0] * 30
          if self.first:
              self.first = False
              es = [0] * 30
              ies = [0] * 30
              cnt2 = self._bsf(mod - 1)
              g = 3  # TODO primitive_root ??
              e = pow(g, (mod - 1) >> cnt2, mod)
              ie = pow(e, mod - 2, mod)
              for i in range(cnt2, 1, -1):
                  es[i - 2] = e
                  ies[i - 2] = ie
                  e *= e
                  e %= mod
                  ie *= ie
                  ie %= mod
              now = 1
              for i in range(cnt2 - 2):
                  self.sum_e[i] = (es[i] * now) % mod
                  now *= ies[i]
                  now %= mod
          for ph in range(1, h + 1):
              w = 1 << (ph - 1)
              p = 1 << (h - ph)
              now = 1
              for s in range(w):
                  offset = s << (h - ph + 1)
                  for i in range(p):
                      l = a[i + offset]
                      r = a[i + offset + p] * now
                      a[i + offset] = (l + r) % mod
                      a[i + offset + p] = (l - r) % mod
                  now *= self.sum_e[self._bsf(((1 << 32) - 1) ^ s)]
                  now %= mod
  
      def _butterfly_inv(self, a, mod):
          n = len(a)
          h = self._ceil_pow2(n)
          self.sum_ie = [0] * 30
          if self.first:
              self.first = False
              es = [0] * 30
              ies = [0] * 30
              cnt2 = self._bsf(mod - 1)
              g = 3  # TODO primitive_root ??
              e = pow(g, (mod - 1) >> cnt2, mod)
              ie = pow(e, mod - 2, mod)
              for i in range(cnt2, 1, -1):
                  es[i - 2] = e
                  ies[i - 2] = ie
                  e *= e
                  e %= mod
                  ie *= ie
                  ie %= mod
              now = 1
              for i in range(cnt2 - 2):
                  self.sum_ie[i] = (ies[i] * now) % mod
                  now *= es[i]
                  now %= mod
          for ph in range(h, 0, -1):
              w = 1 << (ph - 1)
              p = 1 << (h - ph)
              inow = 1
              for s in range(w):
                  offset = s << (h - ph + 1)
                  for i in range(p):
                      l = a[i + offset]
                      r = a[i + offset + p]
                      a[i + offset] = (l + r) % mod
                      a[i + offset + p] = ((l - r) * inow) % mod
                  inow *= self.sum_ie[self._bsf(((1 << 32) - 1) ^ s)]
                  inow %= mod
  
      def convolution_mod(self, a, b, mod):
          n, m = len(a), len(b)
          if n == 0 or m == 0:
              return []
          if min(n, m) <= 60:
              if n < m:
                  a, b, n, m = b, a, m, n
              ans = [0] * (n + m - 1)
              for i in range(n):
                  for j in range(m):
                      ans[i + j] += a[i] * b[j]
                      ans[i + j] %= mod
              return ans
          z = 1 << self._ceil_pow2(n + m - 1)
          a += [0] * (z - n)
          self._butterfly(a, mod)
          b += [0] * (z - m)
          self._butterfly(b, mod)
          for i in range(z):
              a[i] *= b[i]
              a[i] %= mod
          self._butterfly_inv(a, mod)
          a = a[: n + m - 1]
          iz = pow(z, mod - 2, mod)
          for i in range(n + m - 1):
              a[i] *= iz
              a[i] %= mod
          return a
  
  
  ans = Convolution().convolution_mod(A, B, MOD)
  print(*ans)
  
problem_description: Statement
  
  You are given a directed graph with N vertices and M edges, not necessarily
  simple. The i-th edge is oriented from the vertex a_i to the vertex b_i.
  Divide this graph into strongly connected components and print them in their
  topological order.
samples: [{"input": "6 7\n    1 4\n    5 2\n    3 0\n    5 5\n    4 1\n    0 3\n    4 2", "output": "4\n    1 5\n    2 4 1\n    1 2\n    2 3 0"}]