#include<iostream>
#include<string>
using namespace std;

int main(){
    string password;
    cin>>password;
    
    boolhasLower=false,hasUpper=false,hasDigit=false,hasSpecial=false;
    string specialChars='$#@'
    
    for(char::password){
        if(islower(c))
        hasLower=true;
        else if(isupper(c))
        hasUpper=true;
        else if(isdigit(c))
        hasDigit=true;
        else if(specialChars.find(c)!=string::npos)
        hasSpecial=true;
    }
    if(hasLower && hasUpper && hasDigit && hasSpecial && password.length()>=6 && password.length<=10)
    cout<<"Password is valid";
    else
    cout<<"Invlid Input"
    return 0;
}