Euler and linear mazes