import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = in.readLine(); char[] ch = str.toCharArray(); int len = ch.length; StringBuilder stringBuilder = new StringBuilder(); ArrayList arrayList = new ArrayList(); for(int i = 0;i < len;i ++){ while(ch[i] == '"'){ while(ch[++i] != '"'){ stringBuilder.append(ch[i]); } arrayList.add(stringBuilder.toString()); stringBuilder = new StringBuilder(); i++; i++; if(i < len); else break; } if(i < len){ if(ch[i] != ' '){ stringBuilder.append(ch[i]); }else{ arrayList.add(stringBuilder.toString()); stringBuilder = new StringBuilder(); } }
}
if(!stringBuilder.toString().equals("")){
arrayList.add(stringBuilder.toString());
}
System.out.println(arrayList.size());
for(String s : arrayList){
System.out.println(s);
}
}
}