#!/usr/bin/env python

t1 = [ 1,
        [ 2,
            [ 3, [], []],
            []
        ],
        [ 4, 
            [ 5, [], []],
            [ 6, 
                [ 7, [], []],
                []
            ]
        ]
    ] 


t2 = [1,[],[]]

t3 = [1, 
        [2, 
            [4, 
               [], 
                [7, [], [] ] 
            ],
            [5, [], [] ]
        ],
        [3, 
            [6, [], [] ], 
            [] 
        ]
    ]

def show_dfs(t, indent=0):
    elem,left,right = t
    print (indent*" "+"  --", elem)
    if left  != []: show_dfs (left , indent+4)
    if right != []: show_dfs (right, indent+4)

def show_lnr(t, indent=0):
    elem,left,right = t
    if left  != []: show_lnr (left, indent+4)
    print (indent*" "+"  --", elem)
    if right != []: show_lnr (right, indent+4)

def show_rnl(t, indent=0):
    elem,left,right = t
    if right != []: show_rnl (right, indent+4)
    print (indent*" "+"  --", elem)
    if left  != []: show_rnl (left, indent+4)

def hoehe(t):
    if len(t) == 0: 
        return 0
    else:
        return 1 + max (hoehe(t[1]),hoehe(t[2]))

# show_dfs(t3)
# print()
show_rnl(t3)
# print (t3)
# print ("Hoehe t:  ", hoehe(t3))
