On each line after the spaces you are printing 1 - n. What you need to do is flip that around the print n - 1.