On the left bank of the river, there were 5 physicists and 5 chemists. All of them need to cross to the right bank. There is a two-seater boat. On the right bank at any time there can not be exactly three chemists or exactly three physicists. How do they all cross over by making 9 trips to the right side?