Program that verifies if a given input is a valid language. Written in Java