<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Print all nodes that don 't have sibling
A Binary Tree Node ; Function to print all non - root nodes that don 't have a sibling ; Base Case ; If this is an internal node , recur for left and right subtrees ; If left child is NULL , and right is not , print right child and recur for right child ; If right child is NULL and left is not , print left child and recur for left child ; Let us create binary tree given in the above example

<ASSISTANT_TASK:>
Python Code:
class Node : 
	 def __init__(self , key ) : 
	 self . key = key 
 self . left = None 
 self . right = None 
   def printSingles(root ) : 
	 if root is None : 
	 return 
  if root . left is not None and root . right is not None : 
	 printSingles(root . left ) 
 printSingles(root . right ) 
  elif root . right is not None : 
	 print root . right . key , 
 printSingles(root . right ) 
  elif root . left is not None : 
	 print root . left . key , 
 printSingles(root . left ) 
   root = Node(1 ) 
 root . left = Node(2 ) 
 root . right = Node(3 ) 
 root . left . right = Node(4 ) 
 root . right . left = Node(5 ) 
 root . right . left . left = Node(6 ) 
 printSingles(root ) 

<END_TASK>
