#include <stdio.h>
#include <ctype.h>
void print_str(char *str,int len){
for(int i=0;(str[i]!='\0')&&(i<len);i++){
printf("%c",str[i]);
}
printf("\n");
}
void parse_shell_input(char *line) {
// Your logic here
char delim = ' ';
int i=0,j=0;
while(line[i] != '\0'){
if(line[i] == delim){
print_str(&line[j],i-j);
i+=1;
while(line[i] == delim){
i++;
}
j=i;
}else{
i++;
}
}
print_str(&line[j],i-j);
}
int main() {
char line[101];
fgets(line, sizeof(line), stdin);
parse_shell_input(line);
return 0;
}