Design a data structure that supports the following two operations:
* `addWord` (or `add_word`) which adds a word,
* `search` which searches a literal word or a regular expression string containing lowercase letters `"a-z"` or `"."` where `"."` can represent any letter
You may assume that all given words contain only lowercase letters.
## Examples
```python
add_word("bad")
add_word("dad")
add_word("mad")
search("pad") == False
search("bad") == True
search(".ad") == True
search("b..") == True
```
**Note:** the data structure will be initialized multiple times during the tests!
class WordDictionary:
  def __init__(self): self.dct = set()
  def add_word(self, word): self.dct.add(word)
  def word_match(self, w, s):
    if len(w) != len(s): return False
    try:
      for i,c in enumerate(s):
        if c != '.' and c != w[i]: return False
      return True
    except: return False
  def search(self, s):
    for w in self.dct:
      if self.word_match(w, s): return True
    return False
class WordDictionary:
  def __init__(self): self.dct = set()
  def add_word(self, word): self.dct.add(word)
  def word_match(self, w, s):
    if len(w) != len(s): return False
    try:
      for i,c in enumerate(s):
        if c != '.' and c != w[i]: return False
      return True
    except: return False
  def search(self, s):
    for w in self.dct:
      if self.word_match(w, s): return True
    return False