<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exists(self, word):
 		""" 		Checks if whole word is present in the trie. 		"""


		node = self.__get_node(word)
		if node:
			return bool(node.output != nil)
		else:
			return False