Problem 7.3. Four friends, Andrey, Boris, Vyacheslav, and Gennady, work as an architect, a barista, a veterinarian, and a guitarist. One day they went to the cinema together and bought tickets for four consecutive seats.

It turned out that:

- next to the veterinarian sit the architect and the guitarist;
- the barista's neighbor on the right is Boris;
- Vyacheslav sits to the right of both Andrey and Boris;
- Andrey knows both of his neighbors;
- the guitarist and the barista do not sit next to each other.

Who has which profession?
Answer: Barista - Gennady, architect - Boris, veterinarian - Andrey, guitarist - Vyacheslav.

Solution. From the first and last conditions, it follows that the people are sitting either in the order of "barista, architect, veterinarian, guitarist" or in reverse order. But the barista has a neighbor to the right, therefore, only the first case is possible.

From the second statement, it follows that the second from the left (architect) is Boris.

From the fourth statement, it follows that Andrey is not sitting at the edge, which means he is sitting in the third place from the left (and his profession is a veterinarian).

From the third statement, it follows that Vyacheslav is at the far right (and his profession is a guitarist), so Gennady is at the far left (and his profession is a barista).