Four little piggies each live in a different house made out of ONE of FOUR different materials: straw, mud, wood and brick.
Ham's house is somewhere to the left of the wooden one and the third one along is the brick house.
Bacon owns a straw house and Pork does not live at either end, but lives somewhere to the right of the mud house.
Sausage's lives in the fourth house, whilst the first bungalow is not made from straw.
Who lives where, and in which house does each little pig live in?
Please write your answer as 1X2X3X4X.
Example: 15263748 means that Ham lives in the straw house, Bacon lives in the mud house, etc.
1 = Ham, 2 = Bacon, 3 = Pork, 4 = Sausage.
5 = Straw, 6 = Mud, 7 = Wood, 8 = Brick.