input: Write a function to generate the masked word for Hangman game.
  assert generate_masked_word("python", "", ["p", "y", "t", "h", "o", "n"]) == "python"
  assert generate_masked_word("javascript", "", ["j", "a", "v", "s", "c", "r", "i", "p", "t"]) == "javascript"
  assert generate_masked_word("swift", "", ["s", "w", "i"]) == "swi__"
  assert generate_masked_word("kotlin", "", ["k", "o", "t", "i"]) == "kot_i_"
output: def generate_masked_word(word, mask, guessed_letters):
      return ''.join(letter if letter in guessed_letters else '_' for letter in word)