#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main(){
    string s;
    cin >> s;
    bool len=false,fig=false,up=false,low=false;
    if(s.size() >= 6) len = true;
    for(int i=0;i<s.size();i++){
        if(isdigit(s[i])) fig = true;
        else if(isupper(s[i])) up = true;
        else if(islower(s[i])) low = true;
    }
    cout << ((len && fig && up && low)? "VALID" : "INVALID") << endl;
}