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

int main() {
	regex r("([A-Za-z]{3}).*?([0-9]{4})");
	string s("January 19934");
	smatch match;
	std::stringstream res("");
	if (regex_search(s, match, r)) {
    	res << match.str(1) << " " << match.str(2);
	}
	cout << res.str();
    return 0;
}