Optimal Bricklaying