n=int(input()) s=map(int,input().split()) s=list(s) for i in range(n-1): for j in range(n-i-1): if s[j]<s[j+1]: s[j],s[j+1]=s[j+1],s[j] print(*s)