#include <stdio.h>

struct Body {
    int id;
    int weight;
    int height;
};

void swap(struct Body *a, struct Body *b) {
    struct Body temp;
    temp= *a;
    *a = *b;
    *b = temp;
}

int main(void) {
    struct Body a[] = {
        {1, 65, 169},
        {2, 73, 170},
        {3, 59, 161},
        {4, 79, 175},
        {5, 55, 168}
    };

    int n =5;

    for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
            if (a[i].height < a[j].height) {
                swap(&a[i], &a[j]);
            }
        }
    }

    for (int i = 0; i < n; i++) {
        printf("%d, %d, %d\n",
               a[i].id,
               a[i].weight,
               a[i].height);
    }

    return 0;
}