UVa 10720 - Graph Construction