In the end you are having a conversation with Sam about what happened. You can just try different combinations to find the correct path.
This is the low-spoiler guide for "Conversation with Sam at the Shelter" puzzle in Encodya. Unlike in normal walkthrough, you get gradual hints on how to solve the puzzle. Click the big button below to see your first hint. If the hint contains a spoiler, you will be warned about it before clicking.