No output is coming

#include
using namespace std;

class Node{
public:
int data ;
Node *next;
Node (int num)
{
data = num;
next = NULL;
}
};

void insert_at_tail(Node*&head,int data)
{
Node *n = new Node(data);
if(head == NULL)
{ head = n;

}
Node*temp = head;
while(temp->next!=NULL)
{
	temp = temp->next;
}
temp->next = n;

}

void buildlist(Node *&head)
{
int data ;
cin>>data;
while(data!= -1)
{
insert_at_tail(head,data);
cin>>data;
}

}

int knode(Nodehead,int key)
{
Node
slow = head;
Node*fast ;
int i=0;
while(i<key)
{
fast = fast->next;
i++;
}
while(fast!=NULL && fast->next!=NULL)
{
slow = slow->next;
fast = fast->next;
}
return slow->data;
}

istream& operator>>(istream &io,Node *&head)
{
buildlist(head);
return io;
}
int main() {

Node*head = NULL;
cin>>head;
int key;
cin>>key;
cout<<knode(head,key);

return 0;

}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.