Example of a prefix-free code I came across the following question:

A source $X$ emits symbols from the alphabet $A_x$ with $|A_x| = 8$. We want to construct a preﬁx-free source code for this source.

We want to ﬁnd a code with codeword lengths $(1,3,3,3,5,5,5,5)$. Can such a code exist? If yes, give such a code. If not, prove that.

I checked Kraft's inequality for the given set of lengths and it's fulfilled. So how can we write such a code?
0

100

101

110

11100

11101

11110

11111