#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main()
{
for (string s; cin >> s; )
cout << s << " - " << boolalpha
<< regex_match
(
begin(s),
end(s),
regex("^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{8,}$")
)
<< endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8cmVnZXg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKQp7CiAgZm9yIChzdHJpbmcgczsgY2luID4+IHM7ICkKICAgIGNvdXQgPDwgcyA8PCAiIC0gIiA8PCBib29sYWxwaGEKICAgICAgPDwgcmVnZXhfbWF0Y2gKICAgICAgICAgKAogICAgICAgICAgIGJlZ2luKHMpLAogICAgICAgICAgIGVuZChzKSwKICAgICAgICAgICByZWdleCgiXig/PS4qWzAtOV0pKD89LipbYS16XSkoPz0uKltBLVpdKVswLTlhLXpBLVpdezgsfSQiKQogICAgICAgICApCiAgICAgIDw8IGVuZGw7CgogIHJldHVybiAwOwp9