#include <stdio.h>
#include <ctype.h>
#include <string.h>

#define MAXWORD 100


struct tnode *addtree(struct tnode *, char *);
void treeprint(struct tnode *);
int getword(char *, int);

int main(void)
{

	struct tnode *root;
	char word[MAXWORD];
	
	printf("******** Start ********\n");
	printf("input > ");
	
	root = NULL;
	
	while (getword(word, MAXWORD) != EOF) {
		if (isalpha(word[0])) {
			root = addtree(root, word);	
		}
	}
	/* プリント */
	treeprint(root);

	printf("********* End *********\n");
	
	return 0;
	
}