#include <stdio.h>
#include <stdlib.h>

typedef struct Node{
	int data;
	struct Node *next;
} Node;

void cr_list(Node *head){
	Node *tmp;
	int in;

	scanf("%d", &in);
	while(in != EOF){
		if(head == NULL){
			head = (Node *)malloc(sizeof(Node));
			head->data = in;
			head->next = NULL;
		}else{
			tmp = (Node *)malloc(sizeof(Node));
			head->data = in;
			head->next = tmp;
		}
		scanf("%d", &in);
	}
}

void print(Node *head){
	Node *p;
	p = head;
	while(p){
		printf("out: %d\n", p->data);
		p = p->next;
	}
}

int main(){
	int pause;
	Node *head = NULL;
	cr_list(head);
	print(head);
	scanf("%d", &pause);
}