using System;
using System.Collections.Generic;
using System.Text;

namespace HJ74
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string inputStr = Console.ReadLine();

            StringBuilder sb = new StringBuilder();
            bool isStart = false;
            List<string> lines = new List<string>();
            foreach (char ch in inputStr)
            {
                if (ch == ' ' && isStart == false)
                {
                    if (sb.Length > 0)
                    {
                        lines.Add(sb.ToString());
                        sb.Clear();
                    }
                    continue;
                }
                if (ch == '"')
                {
                    if (isStart == false)
                    {
                        isStart = true;
                    }
                    else
                    {
                        isStart = false;
                        if (sb.Length > 0)
                        {
                            lines.Add(sb.ToString());
                            sb.Clear();
                        }
                    }
                    continue;
                }
                sb.Append(ch);
            }

            if (sb.Length > 0)
            {
                lines.Add(sb.ToString());
            }

            if (lines.Count > 0)
            {
                Console.WriteLine(lines.Count.ToString());
                foreach (string line in lines)
                {
                    Console.WriteLine(line);
                }
            }

        }
    }
}