#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>

int main(void) {
    const char *article[] = {"the", "a", "one", "some", "any"};
    const char *noun[] = {"boy", "girl", "dog", "town", "car"};
    const char *verb[] = {"drove", "jumped", "ran", "walked", "skipped"};
    const char *prep[] = {"to", "from", "over", "under", "on"};
    
    srand(time(NULL));
    
    printf("Random Limerick:\n");
    for (int i = 0; i < 5; i++) {
        char line[100];
        sprintf(line, "%s %s %s %s %s %s",
                article[rand() % 5], noun[rand() % 5],
                verb[rand() % 5], prep[rand() % 5],
                article[rand() % 5], noun[rand() % 5]);
        line[0] = toupper(line[0]);
        printf("%s%s\n", line, (i == 4) ? "." : ",");
    }
    return 0;
}