#!/usr/bin/ruby
# -*- coding: utf-8 -*-

pass = gets.chomp
if pass.length < 6
  puts "INVALID"
elsif (pass =~ /[0-9]/).nil?
  puts "INVALID"
elsif (pass =~ /[A-Z]/).nil?
  puts "INVALID"
elsif (pass =~ /[a-z]/).nil?
  puts "INVALID"
else
  puts "VALID"
end