#include <stdio.h>
#include <string.h>

#define SIZE 10

int main(void) {
    char towns[SIZE][50] = {"Zayed", "Talkha", "Cairo", "Alexandria",
                            "Mansoura", "Giza", "Luxor", "Aswan",
                            "Tanta", "Ismailia"};
    char temp[50];

    // ترتيب الفقاعات (Bubble Sort) للنصوص
    for (int i = 0; i < SIZE - 1; i++) {
        for (int j = 0; j < SIZE - i - 1; j++) {
            if (strcmp(towns[j], towns[j + 1]) > 0) {
                strcpy(temp, towns[j]);
                strcpy(towns[j], towns[j + 1]);
                strcpy(towns[j + 1], temp);
            }
        }
    }

    printf("Alphabetized list of towns:\n");
    for (int i = 0; i < SIZE; i++) {
        printf("%s\n", towns[i]);
    }
    return 0;
}