Since you know the indexes, the number of indexes, and they are in sequence, all you have to do is,
// comment : Number of Indexes = N;
// comment : Index Array = Index[ N ];
Current_Index = 0;
Loop_Counter = 0;
While Current_Index < N
If Index[Current_Index] == Loop_Counter{
Print Index[Current_Index];
Current_Index = Current_Index + 1;
Else
Print "-";
Endif
Loop_Counter = Loop_Counter + 1;
End While