import std.stdio;
import std.string;
import 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" );
}