Paths in an nxn grid