Getting error while trying to print output

I just started using mathematica on my mac. I need to draw a graph and perform depth first search on it. But whenever I try to plot the graph using GraphPlot function, I keep getting an error that went like this “SetDelayed::write: “Tag In in In[] is Protected””. How can I remove this error?

May be you had something like `x+y = 5` and may be 1000 other possibilities. The fix is to allow the left side of the assignment be assigned to. May be others will have better guess. It would have been easier if you could post the code that produced the error.

I wrote the following command:
In[1] := GraphPlot[{a → c, a → d, c → e, c → g, e → h, e → g, j → g, g → b, h → g, d → f, d → h, f → k, f → i, i → h, i → d, i → b}, DirectedEdges → True, VertexLabeling → True];
The first time it worked, after that I keep getting the same error.

The problem is this

In[1] :=

I am not sure what you wrote that there for. Simply remove it. If you want to assign the expression to variable, you can write

myGraph = GraphPlot[{a -> c, a -> d, c -> e, c -> g, e -> h, e -> g, j -> g,...... etc.... 

Tried to do that also. But sometimes I get following error:
$RecursionLimit::reclim: Recursion depth of 1024 exceeded
and sometimes, it just works but I get no output, just blank spaces.

Sounds like there are two issues going on.

a) The semicolon at the end of your input line says to not make an output in the notebook window.

b) One or more variables are set somehow so there is a loop in the graph.

You can start with a new Mathematica session, quit and restart the Mathematica Kernel
(Evaluation menu - Quit Kernel - Local), or look to see if vertex names were defined somehow.

? Global`*

will print out the names of the user variables and symbolic constants as hyperlinks -
click on each one to see if it has a value, or just a name (example, Global`d).

The cell labels, **In**,are generated by Mathematica. You do not enter them.