41(1283). The path from $A$ to $B$ goes 3 km uphill, 6 km downhill, and 12 km on flat ground. The motorcyclist covered this path in 1 hour and 7 minutes, and the return path in 1 hour and 16 minutes. Find the motorcyclist's speed uphill and downhill, if his speed on flat ground was 18 km/h. (Note that the motorcyclist traveled at constant speeds both uphill and downhill, both on the path $A B$ and on the return path.)