Problems from Baltic Olympiad in Informatics 2007, Day 2