#include <iostream>
using namespace std;


bool hasNumber(string s){
  for(size_t i = 0; i < s.size(); i++)
    if(0 <= (s[i] - '0') && (s[i] - '0') <= 9)
      return true;
  return false;
}


bool hasUpper(string s){
  for(size_t i = 0; i < s.size(); i++)
    if(0 <= (s[i] - 'A') && (s[i] - 'A') < 26)
      return true;
  return false;
}


bool hasLower(string s){
  for(size_t i = 0; i < s.size(); i++)
    if(0 <= (s[i] - 'a') && (s[i] - 'a') < 26)
      return true;
  return false;
}


int main(void){
  string s;
  cin >> s;
  if(s.size() >= 6 && hasNumber(s) && hasUpper(s) && hasLower(s)){ cout << "VALID" << endl; }
  else{ cout << "INVALID" << endl; }
  return 0;
}