#include <iostream>
#include <string>
using namespace std;

int main(){
	string input, out = "";
	int knm, size;
	cin >> input;
	size = input.size();
	knm = input[input.size() - 1];
	if (knm == 44 || knm == 46) { size--; }
	if (size >= 3 && size <= 6) {
		for (int i = 0; i < size;i++){
			out += input[i];
		}
	}
	while(cin >> input){
		size = input.size();
		knm = input[input.size() - 1];
		if (knm == 44 || knm == 46) { size--; }
		if (size >= 3 && size <= 6) {
			out += " ";
			for (int i = 0; i < size; i++) {
				out += input[i];
			}
		}
	}
	cout << out << endl;
	return 0;
}