decl 
  int n,arr[10],i,j,dup, BubbleSort(int first, int last); 
enddecl

int BubbleSort(int first, int last)
{
  decl
    int temp;
  enddecl

  begin
    if((first < last) AND (last > 0)) then

      if(arr[first] > arr[first+1]) then
        temp = arr[first];
        arr[first] = arr[first+1];
        arr[first+1] = temp;
      endif;

      dup = BubbleSort(first+1, last);
      dup = BubbleSort(first, last-1);
    endif;

    return 0;
  end
}

int main()
{
  decl
    int r;
  enddecl

  begin
    read(n);

    i=0;
    while(i<n) do
      read(arr[i]);
      i = i+1;
    endwhile;

    r = BubbleSort(0,n-1);

    i=0;
    while(i<n) do
      write(arr[i]);
      i = i+1;
    endwhile;

    return 0;
  end
}