=ARRAYFORMULA({A1:B1; SORT({
QUERY(UNIQUE(IFERROR(VLOOKUP(INDEX(SORT(A2:B, 1, 1, 2, 0), , 1),
SORT(A2:B, 1, 1, 2, 0), {1, 2}, 0))), "select Col1,Col2+1 label Col2+1''", 0);
QUERY(UNIQUE(IFERROR(VLOOKUP(INDEX(SORT(A2:B, 1, 1, 2, 0), , 1),
SORT(A2:B, 1, 1, 2, 0), {1, 2}, 0))), "select Col1,Col2+2 label Col2+2''", 0);
QUERY(UNIQUE(IFERROR(VLOOKUP(INDEX(SORT(A2:B, 1, 1, 2, 0), , 1),
SORT(A2:B, 1, 1, 2, 0), {1, 2}, 0))), "select Col1,Col2+3 label Col2+3''", 0);
QUERY(UNIQUE(IFERROR(VLOOKUP(INDEX(SORT(A2:B, 1, 1, 2, 0), , 1),
SORT(A2:B, 1, 1, 2, 0), {1, 2} ,0))) ,"select Col1,Col2+4 label Col2+4''", 0);
QUERY(UNIQUE(IFERROR(VLOOKUP(INDEX(SORT(A2:B, 1, 1, 2, 0), , 1),
SORT(A2:B, 1, 1, 2, 0), {1, 2}, 0))), "select Col1,Col2+5 label Col2+5''", 0)},
1, 1, 2, 0)})