#include<bits/stdc++.h>
using namespace std;

// 总体思路:解析出参数存放在vector数组中,之后遍历数组打印
int main(){
    string s;
    getline(cin,s);
    int n=s.length();
    int count=0;
    vector<string> v;
    string temp="";
    for(int i=0;i<n;i++){
        if(s[i]=='"' && (i!=n-1) ){
            int j=i+1;
            while( (j < n) && s[j] != '"'){
                j++;
            }
            count++;
            v.push_back(s.substr(i+1,j-i-1));
            i=j;
        }else if(s[i]==' '||(i==n-1)){
            if(i==n-1){
                temp+=s[i]; // 最后一个字符
            }
            if(temp != ""){
                v.push_back(temp);
                count++;
            }
            temp="";
        }else{
            temp+=s[i];
        }
    }
    cout << count << endl;
    for(auto item:v){
        cout << item << endl;
    }
    return 0;
}