In a word of riddles called Briddles, 9 numbers from 1 - 9 want to reach to the other side of the river. Since its a world of riddles, therefore, there are some rules:

Rule-1: Maximum 3 numbers can cross at a time.

Rule-2: River cannot sail on its own.

Rule-3: The sum of numbers crossing at a time must be a square number.

You need to plan trips such that minimum trips are needed for all numbers to cross.