{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eLast years Chicago was full of gangster fights and strange murders. The chief of the police got really tired of all these crimes, and decided to arrest the mafia leaders.\u003c/p\u003e\u003cp\u003eUnfortunately, the structure of Chicago mafia is rather complicated. There are \u003ci\u003en\u003c/i\u003e persons known to be related to mafia. The police have traced their activity for some time, and know that some of them are communicating with each other. Based on the data collected, the chief of the police suggests that the mafia hierarchy can be represented as a tree. The head of the mafia, Godfather, is the root of the tree, and if some person is represented by a node in the tree, its direct subordinates are represented by the children of that node. For the purpose of conspiracy the gangsters only communicate with their direct subordinates and their direct master.\u003c/p\u003e\u003cp\u003eUnfortunately, though the police know gangsters’ communications, they do not know who is a master in any pair of communicating persons. Thus they only have an undirected tree of communications, and do not know who Godfather is.\u003c/p\u003e\u003cp\u003eBased on the idea that Godfather wants to have the most possible control over mafia, the chief of the police has made a suggestion that Godfather is such a person that after deleting it from the communications tree the size of the largest remaining connected component is as small as possible. Help the police to find all potential Godfathers and they will arrest them.\u003c/p\u003e\u003c/span\u003e\n \u003c/div\u003e\n给一棵树,求出树的重心,树的重心为:删除该点之后,使得形成的多棵树中节点数最大值最小。\n"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe first line of the input file contains \u003ci\u003en\u003c/i\u003e — the number of persons suspected to belong to mafia (2 ≤ \u003ci\u003en\u003c/i\u003e ≤ 50 000). Let them be numbered from 1 to \u003ci\u003en\u003c/i\u003e.\u003c/p\u003e\u003cp\u003eThe following \u003ci\u003en\u003c/i\u003e − 1 lines contain two integer numbers each. The pair \u003ci\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e, \u003ci\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e means that the gangster \u003ci\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e has communicated with the gangster \u003ci\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e. It is guaranteed that the gangsters’ communications form a tree.\u003c/p\u003e\u003c/span\u003e\n \u003c/div\u003e\n\u003cbr\u003e一个节点数为n的数(n\u003c\u003d5e4)\n\u003cbr\u003e接下来n-1行,每行两个整数,表示树上一条边。\n"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cp\u003ePrint the numbers of all persons that are suspected to be Godfather. The numbers must be printed in the increasing order, separated by spaces.\u003c/p\u003e\n \u003c/div\u003e\n\u003cbr\u003e如果有多个,那么按编号大小依次输出"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e6\n1 2\n2 3\n2 5\n3 4\n3 6\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e2 3\u003c/pre\u003e"}}]}