#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int main(){
	string str;
	getline(cin,str);
	str += " ";
    string word[1024];
    int j = 0;
    for(int i = 0; i < str.size(); i++){
        if(str[i] == '.' || str[i] == ',' || str[i] == ' ')j++;
        else word[j] += str[i];
    }
    for(int i = 0; i < j; i++){
        if(word[i].size() > 2 && word[i].size() < 7){
            cout << word[i];
            printf("%c",i==j-1?'\n':' ');
        }
    }
	return 0;
}


Win today's preliminary contest and be qualified to visit University of Aizu.