int main()
{	
	BSTree tree;   // The binary search tree to be tested
	char command;  // The command entered by the user (I, N, F, D, L, or P)
	int item;      // The item to have the action performed on
	
	cin >> command;
	
	while (cin)
	{
		switch (command)
		{
			case 'I':
				tree.initialize();
				break;
			case 'N':
				cin >> item;
				tree.insert(item);
				break;
			case 'F':
				cin >> item;
				cout << item << " ";
				if (tree.find(item))
					cout << "Found" << endl;
				else
					cout << "Not Found" << endl;
				break;
			case 'D':
				cin >> item;
				tree.del(item);
				break;
			case 'L':
				tree.inorder(cout);
				break;
			case 'P':
				tree.preorder(cout);
				break;
			default:
				cout << "Illegal Command" << endl;
				cin.clear();
				cin.ignore(255, '\n');
				break;
		}
		cin >> command;
	}
}