using System.Collections.Generic;
public Node(int data, Node next = null){
public static void Main()
var node = new Node(1,new Node(3,new Node(7,new Node(3,new Node(3,new Node(6,new Node(5,new Node(3,new Node(3)))))))));
var result = KthToLast(node, 56);
Console.WriteLine(result);
public static int KthToLast(Node root, int k){
var set = new HashSet<int>();