m = input()
index_ = []
#计算所有"的索引
for i,j in enumerate(m):
     if j == '"':
            index_.append(i)
result = []
if len(index_)>0:
    #双引号前的字符串放到列表result中
    result.append(m[:index_[0]]) 
    #双引号两两成对放到列表result中
    for i in range(len(index_)):
        if i % 2 == 0:
            #双引号从索引0开始
            if i == 0:
                result.append(m[index_[i]:index_[i+1]+1])
            #双引号索引从非0开始
            else:
                if index_[i]-index_[i-1]<=3:
                    result.append(m[index_[i]:index_[i+1]+1])
            #下一组双引号和上一组索引号中间有字符串
                else:
                    result.append(m[index_[i-1]+1:index_[i]])
                    result.append(m[index_[i]:index_[i+1]+1])
    #字符串结尾不是双引号
    if index_[-1]<len(m)-1:
        result.append(m[index_[-1]+1:])
#字符串没有双引号
else:
    result = m.split()
#解析字符串,参数放到result_1中   
result_1 = []
for a in result:
    if '"' in a:
        result_1.append(a.replace('"',''))
    else:
        result_1.extend(a.split())
print(len(result_1))
for i in result_1:
    print(i)