CF747E.Comments
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
The first line contains non-empty comments feed in the described format. It consists of uppercase and lowercase letters of English alphabet, digits and commas.
It is guaranteed that each comment is a non-empty string consisting of uppercase and lowercase English characters. Each of the number of comments is integer (consisting of at least one digit), and either equals 0 or does not contain leading zeros.
The length of the whole string does not exceed 106 . It is guaranteed that given structure of comments is valid.
输入格式
Print comments in a format that is given in the statement. For each level of nesting, comments should be printed in the order they are given in the input.
输出格式
The first example is explained in the statements.
输入输出样例
输入#1
hello,2,ok,0,bye,0,test,0,one,1,two,2,a,0,b,0
输出#1
3 hello test one ok bye two a b
输入#2
a,5,A,0,a,0,A,0,a,0,A,0
输出#2
2 a A a A a A
输入#3
A,3,B,2,C,0,D,1,E,0,F,1,G,0,H,1,I,1,J,0,K,1,L,0,M,2,N,0,O,1,P,0
输出#3
4 A K M B F H L N O C D G I P E J
说明/提示
The first example is explained in the statements.