#include<bits/stdc++.h>
using namespace std;
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	string s;
	cin >> s;
	int P = 13, K = 13, H = 13, T = 13;
	bool w = 0;
	for(int i = 0; i < s.size(); i += 3) {
		for(int j = i + 3; j < s.size(); j += 3) {
			if(s.substr(i, 3) == s.substr(j, 3)) {
				cout << "GRESKA" << '\n';
				return 0;
			}
		}
		if(s[i] == 'P') P--;
		if(s[i] == 'K') K--;
		if(s[i] == 'H') H--;
		if(s[i] == 'T') T--;
	}
	cout << P << ' ' << K << ' ' << H << ' ' << T << '\n';
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |