Floyd warshall first attempt