Implement a class StreamChecker that receives a list of words in its constructor and then a stream of letters:
query(letter) accepts the next letter of the stream and returns true if some suffix of the letters received so far (the last 1, 2, 3, ... letters, ending with this one) is one of the words, otherwise false- With
words = ["cd", "f", "kl"], the stream a b c d e f g h i j k l gives true exactly at d, f and l - Each query must cost time proportional to the length of the longest word, not to the number of letters received