Starting from A : neighbors = B,D
Visit B: neighbors E
Visit E : neighbors C,G
Visit C : neighbors A,G
Visit G : neighbors null
backtrack till A
Visit D : neighbors F
Visit F.
now edges {FC, CA} forms loop hence back edges
edges {EG, FG } are cross edges.
Initially I've taken FC also as a cross edge but it helps to form a cycle hence it is not considered as a cross edge.