NailingPlanks solution, needs to be optimized just for long planks