output data insertion by recursive travel