%{
#include<stdio.h>
#include<string.h>
int a = 0, b=0, c=0, d=0, l=0;
%}
%%
[a-z] {a++;l++;}
[A-Z] {b++;l++;}
[0-9] {c++;l++;}
[$&+, :;=?@#|'<>.-^*()%!] {d++;l++;}
. ;
%%
int yywrap(void){}
int main()
{
// The function that starts the analysis
yylex();
if(a>0 && b>0 && c>0 && d>0 && l>=8)
printf("VALID\n");
else
printf("INVALID\n");
return 0;
}
JXsgCgkjaW5jbHVkZTxzdGRpby5oPiAKCSNpbmNsdWRlPHN0cmluZy5oPiAKCWludCBhID0gMCwgYj0wLCBjPTAsIGQ9MCwgbD0wOyAKJX0gCgkKCiUlIApbYS16XSB7YSsrO2wrKzt9IApbQS1aXSB7YisrO2wrKzt9IApbMC05XSB7YysrO2wrKzt9IApbJCYrLCA6Oz0/QCN8Jzw+Li1eKigpJSFdIHtkKys7bCsrO30gCi4gOyAKJSUgCgkKaW50IHl5d3JhcCh2b2lkKXt9IAoJCmludCBtYWluKCkgCnsJIAoJLy8gVGhlIGZ1bmN0aW9uIHRoYXQgc3RhcnRzIHRoZSBhbmFseXNpcyAKCXl5bGV4KCk7IAoJaWYoYT4wICYmIGI+MCAmJiBjPjAgJiYgZD4wICYmIGw+PTgpIAoJcHJpbnRmKCJWQUxJRFxuIik7IAoJZWxzZQoJCXByaW50ZigiSU5WQUxJRFxuIik7IAoJcmV0dXJuIDA7IAp9IAo=