#include using namespace std; set _set = {'!', '@', '#', '$'}; void check(string t) { int dx = 0, xx = 0, sz = 0, ts = 0; for (int i = 0; i < t.size(); i++) { if (isupper(t[i])) dx = 1; if (islower(t[i])) xx = 1; if (_set.count(t[i])) ts = 1; if (isdigit(t[i])) sz = 1; if (!isupper(t[i]) && !islower(t[i]) && !isdigit(t[i]) && !_set.count(t[i])) return; } if (dx + xx + sz < 2) return; if (ts == 0) return; cout << t << endl; } int main() { string s; cin >> s; s += ','; string t = ""; for (int i = 0; i < s.size(); i++) { if (s[i] == ',') { check(t); t = ""; } else t += s[i]; } return 0; }