{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants will be placed in a large circle, facing inwards. Someone is arbitrarily chosen as number 1, and the rest are numbered counter-clockwise up to N(who will be standing on 1’s left). Starting from 1 and moving counter-clockwise,one labour official counts off k applicants, while another official starts from N and moves clockwise,counting m applicants. The two who are chosen are then sent off for retraining; if both officials pick the same person she (he) is sent off to become a politician. Each official then starts counting again at the next available person and the process continues until no-one is left. Note that the two victims(sorry, trainees) leave the ring simultaneously, so it is possible for one official to count a person already selected by the other official.\n\nInput\n\nWrite a program that will successively read in (in that order) the three numbers (N,k and m;k;m\u003e0,0\u003cN\u003c20) and determine the order in which the applicants are sent off for retraining. Each set of three numbers will be on a separate line and the end of data will be signalled by three zeroes (0 0 0).\n\nOutput\n\nFor each triplet, output a single line of numbers specifying the order in which people are chosen. Each number should be in a field of 3 characters. For pairs of numbers list the person chosen by the counter-clockwise official first. Separate successive pairs (or singletons) by commas (but there should not be atrailing comma).Note:The symbol⊔in the Sample Output below represents a space.\n\nSample Input\n\n10 4 3\n0 0 0\n\nSample Output\n\n␣␣4␣␣8,␣␣9␣␣5,␣␣3␣␣1,␣␣2␣␣6,␣10,␣␣7\n\n为了认真尝试缩小(减少)领取救济金的队伍,新国家绿工党犀牛党决定采取以下战略。每天,所有申请救济金的人将被安排在一个大圆圈里,面向内侧。有人被任意选为1号,其余的人按逆时针方向编号,直到N(他将站在1的左边)。从1号开始,逆时针方向移动,一位劳工官员数落k名申请人,另一位官员从N号开始,顺时针方向移动,数落m名申请人。被选中的两个人将被送去接受再培训;如果两个官员都选中了同一个人,她(他)将被送去当政治家。然后每个官员又开始计算下一个可用的人,这个过程一直持续到没有人留下。需要注意的是,两个受害者(对不起,是学员)同时离开擂台,所以一个官员有可能计算另一个官员已经选择的人。\n\n輸入\n\n写一个程序,按顺序连续读入三个数字(N,k和m;k;m\u003e0,0\u003cN\u003c20),并确定申请人被送去再培训的顺序。每一组三个数字都在单独的一行中,数据结束时用三个零(0 0 0)表示。\n\n輸出\n\n对于每个三胞胎,输出一行数字,指定选人的顺序。每个数字应在一个3个字符的字段中。对于成对的数字,先列出逆时针官员选择的人。注:下面的样本输出中的符号⊔代表一个空格。\n\n输入示例\n\n10 4 3\n0 0 0\n\n采样输出\n\n␣␣4␣␣8,␣␣9␣␣5,␣␣3␣␣1,␣␣2␣␣6,␣10,␣␣7\n\n"}}]}