Genesis 39:20

39:20 Joseph’s master took him and threw him into the prison, the place where the king’s prisoners were confined. So he was there in the prison.

Genesis 40:5

40:5 Both of them, the cupbearer and the baker of the king of Egypt, who were confined in the prison, had a dream the same night. Each man’s dream had its own meaning.