#include <iostream>
#include <string>
 
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
 
using namespace std;
 
typedef long long ll;
 
bool check(string s){
    if(s.size() < 6) return false;
    bool a = false, A = false, num = false;
    rep(i, s.size()){
        if('a' <= s[i] && s[i] <= 'z') a = true;
        if('A' <= s[i] && s[i] <= 'Z') A = true;
        if('0' <= s[i] && s[i] <= '9') num = true;
    }
    return a&A&num;
}
 
int main(){
    string s;
    cin >> s;
    cout << (check(s)?"VALID":"INVALID") << endl;
 
    return 0;
}