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

int main(){
    string s;
    int y=0;//是否在引号里,默认不在
    string t="";
    vector<string> v;
    
    while(getline(cin, s)){
        for(int i=0;i<s.size();++i){
            if(s[i]=='"'){
                y++;
            }else if(s[i]==' '&&y%2==0)  {v.push_back(t);t.clear();}
            else t+=s[i];
        }
        v.push_back(t);
        cout<<v.size()<<endl;
        
        for(int i=0;i<v.size();++i){
            cout<<v[i]<<endl;
        }
    }
    
    return 0;
}