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

int main() {
	string str; cin >> str;
	bool len = false; bool num = false;
	bool cap = false; bool sma = false;
	if (str.size() >= 6) len = true;
	for (auto &itr : str) {
		if (isdigit(itr) != 0) num = true;
		if (isupper(itr) != 0) cap = true;
		if (islower(itr) != 0) sma = true;
	}
	if (len == true && num == true
		&& cap == true && sma == true)
		cout << "VALID" << endl;
	else cout << "INVALID" << endl;
	return 0;
}
