#include<cstdio>
#include<iostream>
using namespace std;
int main() {
	string str;
	cin >> str;
	int flg = 0;
	if(str.size() > 5) flg = 1;
	for(int i = 0; i < str.size(); i++) {
		if(str[i] >= '0' && str[i] <= '9') flg |= 2;
		if(str[i] >= 'A' && str[i] <= 'Z') flg |= 4;
		if(str[i] >= 'a' && str[i] <= 'z') flg |= 8;
	}
	if(flg == 15) puts("VALID");
	else puts("INVALID");
	return 0;
}