Hangman/Segmented function