Given a string containing just the characters, determine if the input string is valid