Construct the Fenwick Tree
buildTree ( str ) ; document . write ( printCharacter ( str , 1 , 2 , 2 ) + " " ) ; updateTree ( str , 4 , ' ' ) ; document . write ( printCharacter ( str , 1 , 5 , 4 ) + " " ) ;