import sys
while True:
    try:
        s = input()
        ans = []
        temp = ''
        flag = 0
        for c in s:
            if (c == '\'' or c == '\"') and flag == 0:
                flag = 1
                continue
            elif (c == '\'' or c == '\"') and flag == 1:
                ans.append(temp)
                temp = ''
                flag = 0
                continue
            if flag:
                temp += c
            elif c.isspace():
                if temp:
                    ans.append(temp)
                    temp = ''
                else:
                    continue
            else:
                temp += c
        if temp :
            ans.append(temp)
        print(len(ans))
        for item in ans:
            print(item)
                
    except:
        break