// テ・ツ淞コテヲツ慊ャテ」ツδ?」ツδウテ」ツδ療」ツδャテ」ツδシテ」ツδ?(テァツクツョテ・ツーツ湘ァツ可?

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define int long long
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
typedef pair<int, int> pii;
typedef long long ll;
constexpr ll INF = 1001001001001001LL;
constexpr ll MOD = 1000000007LL;

signed main() {
    string s; cin >> s;
    int ok = 1;
    if(s.length() < 6) ok = 0;
    
    int a = 0, b = 0, c = 0;
    rep(i,0,s.length()) {
        if('0' <= s[i] && s[i] <= '9') a = 1;
        if('A' <= s[i] && s[i] <= 'Z') b = 1;
        if('a' <= s[i] && s[i] <= 'z') c = 1;
    }
    if(ok + a + b + c == 4) cout << "VALID" << endl;
    else cout << "INVALID" << endl;
    return 0;
}