  We study the hat guessing game on graphs. In this game, a player is placed on
each vertex $v$ of a graph $G$ and assigned a colored hat from $h(v)$ possible
colors. Each player makes a deterministic guess on their hat color based on the
colors assigned to the players on neighboring vertices, and the players win if
at least one player correctly guesses his assigned color. If there exists a
strategy that ensures at least one player guesses correctly for every possible
assignment of colors, the game defined by $\langle G,h\rangle$ is called
winning. The hat guessing number of $G$ is the largest integer $q$ so that if
$h(v)=q$ for all $v\in G$ then $\langle G,h\rangle$ is winning.
  In this note, we determine whether $\langle G,h\rangle $ is winning for any
$h$ whenever $G$ is a cycle, resolving a conjecture of Kokhas and Latyshev in
the affirmative and extending it. We then use this result to determine the hat
guessing number of every cactus graph, graphs in which every pair of cycles
share at most one vertex.
