Creating a Node class
public class Node { public int [ ] soln ; public int level ; public List < Node > child ; public Node parent ; public Node ( Node parent , int level , int N ) { this . parent = parent ; this . level = level ; this . soln = new int [ N ] ; } } class GFG { static int N ;