{"raw_statement":[{"iden":"statement","content":"You are given an undirected graph, consisting of $n$ vertices and $m$ edges. The graph does not necessarily connected. Guaranteed, that the graph does not contain multiple edges (more than one edges between a pair of vertices) or loops (edges from a vertex to itself).\n\nA cycle in a graph is called a simple, if it contains each own vertex exactly once. So simple cycle doesn't allow to visit a vertex more than once in a cycle.\n\nDetermine the edges, which belong to _exactly on one_ simple cycle."},{"iden":"input","content":"The first line contain two integers $n$ and $m$ $(1 \\le n \\le 100\\,000$, $0 \\le m \\le \\min(n \\cdot (n - 1) / 2, 100\\,000))$ — the number of vertices and the number of edges.\n\nEach of the following $m$ lines contain two integers $u$ and $v$ ($1 \\le u, v \\le n$, $u \\neq v$) — the description of the edges."},{"iden":"output","content":"In the first line print the number of edges, which belong to exactly one simple cycle.\n\nIn the second line print the indices of edges, which belong to exactly one simple cycle, in **increasing** order. The edges are numbered from one in the same order as they are given in the input."},{"iden":"examples","content":"Input\n\n3 3\n1 2\n2 3\n3 1\n\nOutput\n\n3\n1 2 3 \n\nInput\n\n6 7\n2 3\n3 4\n4 2\n1 2\n1 5\n5 6\n6 1\n\nOutput\n\n6\n1 2 3 5 6 7 \n\nInput\n\n5 6\n1 2\n2 3\n2 4\n4 3\n2 5\n5 3\n\nOutput\n\n0"}],"translated_statement":[{"iden":"statement","content":"你被给定一个无向图，包含 $n$ 个顶点和 $m$ 条边。该图不一定连通。保证图中不含重边（顶点对之间多于一条边）或自环（从顶点到自身的边）。\n\n图中的一个环被称为简单环，如果它恰好包含每个自身顶点一次。因此，简单环不允许在环中多次访问同一个顶点。\n\n确定属于_恰好一个_简单环的边。 \n\n第一行包含两个整数 $n$ 和 $m$ $(1 lt.eq n lt.eq 100 thin 000$, $0 lt.eq m lt.eq min (n dot.op (n -1) \\/ 2, 100 thin 000))$ —— 顶点数和边数。\n\n接下来的 $m$ 行每行包含两个整数 $u$ 和 $v$ ($1 lt.eq u, v lt.eq n$, $u eq.not v$) —— 边的描述。\n\n第一行输出属于恰好一个简单环的边的数量。\n\n第二行按*递增*顺序输出属于恰好一个简单环的边的编号。边的编号从 1 开始，顺序与输入中给出的顺序一致。"},{"iden":"input","content":"第一行包含两个整数 $n$ 和 $m$ $(1 lt.eq n lt.eq 100 thin 000$, $0 lt.eq m lt.eq min (n dot.op (n -1) \\/ 2, 100 thin 000))$ —— 顶点数和边数。接下来的 $m$ 行每行包含两个整数 $u$ 和 $v$ ($1 lt.eq u, v lt.eq n$, $u eq.not v$) —— 边的描述。"},{"iden":"output","content":"第一行输出属于恰好一个简单环的边的数量。第二行按*递增*顺序输出属于恰好一个简单环的边的编号。边的编号从 1 开始，顺序与输入中给出的顺序一致。"},{"iden":"examples","content":"输入\n3 3\n1 2\n2 3\n3 1\n输出\n3\n1 2 3 \n\n输入\n6 7\n2 3\n3 4\n4 2\n1 2\n1 5\n5 6\n6 1\n输出\n6\n1 2 3 5 6 7 \n\n输入\n5 6\n1 2\n2 3\n2 4\n4 3\n2 5\n5 3\n输出\n0"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ G = (V, E) $ be an undirected graph with:  \n- $ V = \\{v_1, v_2, \\dots, v_n\\} $, $ |V| = n $,  \n- $ E = \\{e_1, e_2, \\dots, e_m\\} $, $ |E| = m $, where each edge $ e_i = \\{u_i, v_i\\} $, $ u_i \\ne v_i $, and no multiple edges or loops.  \n\nLet $ \\mathcal{C} $ denote the set of all simple cycles in $ G $.  \nFor an edge $ e \\in E $, define:  \n$$\nf(e) = \\left| \\{ C \\in \\mathcal{C} \\mid e \\in C \\} \\right|\n$$  \ni.e., the number of simple cycles containing edge $ e $.\n\n**Constraints**  \n1. $ 1 \\le n \\le 100{,}000 $  \n2. $ 0 \\le m \\le \\min\\left( \\frac{n(n-1)}{2}, 100{,}000 \\right) $  \n3. All edges are distinct and without self-loops.\n\n**Objective**  \nFind the set:  \n$$\nE_{\\text{unique}} = \\{ e_i \\in E \\mid f(e_i) = 1 \\}\n$$  \nOutput:  \n- $ |E_{\\text{unique}}| $  \n- The indices $ i $ (in increasing order) such that $ e_i \\in E_{\\text{unique}} $, where edges are indexed from 1 in input order.","simple_statement":null,"has_page_source":false}