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; boolean flag = false; StringBuilder stringBuilder = new StringBuilder(); ArrayList arrayList = new ArrayList(); for(int i = 0;i < len;i ++){ if(ch[i] == '"'){ if(flag == false){ flag = true; }else{ flag = false; continue; } } if(ch[i] == ' '&& flag == false){ arrayList.add(stringBuilder.toString()); stringBuilder = new StringBuilder(); } if(ch[i] !=' '&& flag == false){ stringBuilder.append(ch[i]); } if(flag == true && ch[i]!='"'){ stringBuilder.append(ch[i]); } } arrayList.add(stringBuilder.toString());
System.out.println(arrayList.size());
for(String s : arrayList){
System.out.println(s);
}
}
}