#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
using namespace std;
int main(){
	
	int f[4]={0};
	string s;
	cin>>s;
	if(s.length()>=6)
		f[0]=1;
	if(f[0]==1){
		for(int i=0;i<s.length();i++){
			if(s[i]>='A'&&s[i]<='Z')
				f[1]=1;
			else if(s[i]>='a'&&s[i]<='z')
				f[2]=1;
			else if(s[i]>='0'&&s[i]<='9')
				f[3]=1;
		}
	}
		if(f[1]==1&&f[2]==1&&f[3]==1)
			cout<<"VALID"<<endl;
		else
			cout<<"INVALID"<<endl;
	
		
	
	
 	
}