{"trustable":false,"sections":[{"title":"题目描述","value":{"format":"MD","content":" Let\u0027s design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topological graph, i.e. there are directed edges connecting some positions, and no cycle exists. Two players you and I move chesses alternately. In each turn the player should move only one chess from the current position to one of its out-positions along an edge. The game does not end, until one of the players cannot move chess any more. If you cannot move any chess in your turn, you lose. Otherwise, if the misfortune falls on me... I will disturb the chesses and play it again. \n Do you want to challenge me? Just write your program to show your qualification!"}},{"title":"输入格式","value":{"format":"MD","content":"多组数据!\n\n对于每组数据:\n\n- 第一行是n(1≤n≤1000)\n\n- 接下来的n行描述有向图\n - 每行的第一个数字x,表示这个点有x条出边\n - 后面跟着x个整数,表示这x条出边指向哪x个节点\n\n- 然后是询问,也是多组询问\n - 每组数据的第一个数是m,表示有m个棋子\n - 后面跟着m个整数,表示这m个棋子分别在哪个节点上\n - 当你读取的m为0时,询问结束,这组数据结束。在下一组数据之前,别忘了初始化各个数组!"}},{"title":"输出格式","value":{"format":"MD","content":"对于每组数据的每个询问,输出一行:\n- 如果先手必胜,输出`WIN`\n- 否则输出`LOSE`"}},{"title":"样例输入","value":{"format":"MD","content":"```\n4\n2 1 2\n0\n1 3\n0\n1 0\n2 0 2\n0\n\n4\n1 1\n1 2\n0\n0\n2 0 1\n2 1 1\n3 0 1 3\n0\n```"}},{"title":"样例输出","value":{"format":"MD","content":"```\nWIN\nWIN\nWIN\nLOSE\nWIN\n```"}},{"title":"提示","value":{"format":"MD","content":"输入量巨大,建议开外挂"}}]}