Added graph implementation.
Added graph input.