Solve by blocks
PROGRAMMING MOTHERFUCKER