A carpenter has a long rod of length 4m 38 cm. He needs to cut this rod into lengths of 161cm, 23cm and 7cm so that he would get at least one rod of each length and have nothing left over. After a while, the carpenter managed to solve the problem. How many rods of each length did he get?

Find all possible solutions.

Whoever does this is my heroe