added acyclic function + fixed PrintLab

Acyclic checks if graph is a tree or not.
Printlab now prints to the outStream.
Now it's possible to change n without recompiling

Also you can set outStream properly.