Just a simple java implementation of an FA that accepts 5 words