Construct a valid Spanish sentence given the following vocabulary words.
Words: bailar, gustar, triste
"Me gusta bailar cuando estoy triste." (Translation: "I like to dance when I am sad.")
Complete the following task based on the instruction and optional input provided.### Instruction:
Construct a valid Spanish sentence given the following vocabulary words.

### Input:
Words: bailar, gustar, triste

### Output:
"Me gusta bailar cuando estoy triste." (Translation: "I like to dance when I am sad.")