/**
 * Created by hiroqn on 13/10/08.
 */
var fs = require('fs'),
    length = fs.fstatSync(process.stdin.fd).size,
    buffer = new Buffer(length),
    bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
    input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();
function main(){
  var str = input[0];
  if(str.length < 6){
    console.log('INVALID');
    return;
  }
  if(str.match(/[a-z]/) === null){
    console.log('INVALID');
    return;
  }
  if(str.match(/[0-9]/) === null){
    console.log('INVALID');
    return;
  }
  if(str.match(/[A-Z]/) === null){
    console.log('INVALID');
    return;
  }
  console.log('VALID');

}