Automatic Hierarchy In Matrix