```
class Solution(object):
def kthSmallest(self, root, k):
if root == None: return -1
st = []; st.append(root); node = root
while st:
while node and node.left:
st.append(node.left)
node = node.left
node = st.pop()
k -= 1
if k == 0: return node.val
node = node.right
if node: st.append(node)
```