while True:
    try:
        s = input().strip()
        len_s = len(s)
        lst = []
        cmd_lst = []
        count = 1

        for i in s:
            # print(i)
            if i == " " and '"' not in lst:
                if lst:
                    cmd_lst.append("".join(str(x) for x in lst))
                lst.clear()
            elif i == '"' and '"' in lst:
                if lst:
                    cmd_lst.append("".join(str(x) for x in lst[1:]))
                lst.clear()
            else:
                lst.append(i)
        if lst:
            cmd_lst.append("".join(str(x) for x in lst))
        print(len(cmd_lst))
        for x in cmd_lst:
            print(x)
    except:
        break