Memory Tree Program