longest path possible is of length 30