import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextLine()) {
            String line = scan.nextLine();
            //连续空格合并
            line = line.replaceAll("\\s+"" ").trim();
            //System.out.println(line);
            char[] arr =line.toCharArray();
            boolean inYinhao = false;
            ArrayList<Stringparams = new ArrayList();
            StringBuilder sbl = new StringBuilder();
            for(char c:arr) {
                if(c == '"') {
                    inYinhao = !inYinhao;
                    continue;
                }
                if(c==' '&&!inYinhao) { // 碰到空格,一般要提交命令参数
                    params.add(sbl.toString());
                    sbl = new StringBuilder();
                    continue;
                }
                sbl.append(c);
            }
             //结尾没有空格,所以最后一个参数这里要这样加下
            params.add(sbl.toString());
            System.out.println(params.size());
            for(String s:params) {
                System.out.println(s);
            }
        }
    }
}