{"raw_statement":[{"iden":"statement","content":"Berland capital contains n junctions and m roads connecting pairs of junctions. All roads are one-way. As you probably know Berland has two misfortunes: fools and roads.\n\nIt is one month before mayoral election. So it is time for current government to make the city better. To show that they care both about the infrastructure and about the budget, the government decided to repair only _useful_ roads.\n\nCurrent mayor thinks that a road from a junction u to a junction v is useful if there exists a simple path from City Hall to some junction containing the road (u, v). A path is called simple if it does not have any repeated junctions, i.e. contains each junction at most once. The City Hall is located at the junction 1.\n\nHelp Ministry of Road Transport and Highways to find all useful roads in the city.\n\nThe input contains several test cases. Each test case starts with a line containing two integers n, m (2 ≤ n ≤ 2·105;1 ≤ m ≤ 2·105) — the number of junctions and the number of roads in the city. The following m lines contain road descriptions, one description per line. A description consists of a pair of space-separated integers ui, vi (1 ≤ ui, vi ≤ n;ui ≠ vi) meaning that the i-th road leads from the junction ui to the junction vi. The junctions are numbered from 1 to n. The City Hall is located at the junction 1.\n\nIt is guaranteed that there is at most one road between a pair of junctions in each direction.\n\nThere is a blank line after each test case. The sum of n over all test cases in the input doesn't exceed 2·105. The same is true for m: the sum of m over all test cases in the input doesn't exceed 2·105.\n\nPrint two lines for each test case. On the first line print the number of useful roads. The second line should contain the indices of useful roads in ascending order. The roads are indexed from 1 to m in order of appearance in the input. Leave the second line empty if there are no useful roads in the city.\n\n"},{"iden":"input","content":"The input contains several test cases. Each test case starts with a line containing two integers n, m (2 ≤ n ≤ 2·105;1 ≤ m ≤ 2·105) — the number of junctions and the number of roads in the city. The following m lines contain road descriptions, one description per line. A description consists of a pair of space-separated integers ui, vi (1 ≤ ui, vi ≤ n;ui ≠ vi) meaning that the i-th road leads from the junction ui to the junction vi. The junctions are numbered from 1 to n. The City Hall is located at the junction 1.It is guaranteed that there is at most one road between a pair of junctions in each direction.There is a blank line after each test case. The sum of n over all test cases in the input doesn't exceed 2·105. The same is true for m: the sum of m over all test cases in the input doesn't exceed 2·105."},{"iden":"output","content":"Print two lines for each test case. On the first line print the number of useful roads. The second line should contain the indices of useful roads in ascending order. The roads are indexed from 1 to m in order of appearance in the input. Leave the second line empty if there are no useful roads in the city."},{"iden":"examples","content":"Input5 71 25 22 33 44 52 44 2 2 11 2 Output51 3 4 5 611"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the length of the encrypted string.  \nLet $ E = (e_1, e_2, \\dots, e_n) $ be the sequence of ASCII codes of the encrypted string, where $ e_i \\in \\{0, 1, \\dots, 255\\} $ for all $ i \\in \\{1, \\dots, n\\} $.  \n\n**Constraints**  \n1. $ 7 \\leq n \\leq 10^5 $  \n2. $ 0 \\leq e_i \\leq 255 $ for all $ i \\in \\{1, \\dots, n\\} $  \n3. The original string consists solely of lowercase English letters (ASCII codes 97 to 122).  \n\n**Objective**  \nRecover the original string $ S = (s_1, s_2, \\dots, s_n) $, where each $ s_i $ is the character with ASCII code $ d_i $, and $ d_i $ is derived from $ e_i $ via the decryption algorithm.  \nAssume the encryption was a constant additive shift:  \n$$\nd_i = e_i - k \\quad \\text{for some fixed } k \\in \\mathbb{Z}\n$$  \nsuch that $ 97 \\leq d_i \\leq 122 $ for all $ i $.  \nOutput the string $ S $ where $ s_i = \\text{chr}(d_i) $.","simple_statement":"You are given a string encrypted by adding 13 to each character's ASCII code. Decrypt it by subtracting 13 from each number and convert to characters. The original string contains only lowercase English letters.","has_page_source":false}