Challenge: Transpose a Graph

Solve the challenge of finding the transpose of a graph.

Problem statement

Implement a function that will take a graph as input and print its transpose.

Input

A graph.

Output

Return a transpose of the given graph.

Sample input

Graph:

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.