Write a program to obtain the adjacency matrix representation of a graph