import std.stdio, std.string, std.ascii;
 
void main() {
    string s = readln.chomp;
    writeln( (s.length >= 6 && s.count!(isDigit) >= 1 && s.count!(isUpper) >= 1 && s.count!(isLower) >= 1) ?  "VALID" : "INVALID" );
}