• [F] Greedy TT

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • As we all know, TT is a girl who eats thousands and thousands of foods and never tired of it. One day, Mr.Cai decides to punish TT, he transformd TT into a greedy cat :-P. But the little TT hits Mr.Cai and shouts:"Pakchoi, I will never give up eating!". To calm the little greedy cat down, Mr.Cai have to give some food to her. But Mr.Cai set a rule that TT can carry at most ten things, when beyond ten, the little TT will be forced to hand in the first one.Note that Mr.Cai gives one by one.


  • 输入
  • The input contains several test cases. Each case contains a series of numbers, end up with 0,and the number of each test case is less than 3000000.
  • 输出
  • For each test case, output the food that TT got in a line.
  • 样例输入
  • A B G D U 0
  • 样例输出
  • A B G D U
    
  • 提示
  • 来源
  • Mr.Cai
  • 操作

显示春菜