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

int main() {
    char input[100];            // To store the entire input string
    char items[100][10];       // Array to store mixed items (up to 100 items, max 9 chars + null terminator)
    int count = 0;             // Counter for items

    // Prompt the user for input
    printf("Enter the array in format [1a,b2,33,ABC,af]: ");
    scanf("%[^\n]s", input);   // Read the entire line of input.

    // Tokenizing the input string
    char *token = strtok(input, "[,] ");  // Split by commas and brackets

    // Storing the tokens into the items array
    while (token != NULL) {
        strcpy(items[count], token);  // Copy the token into the items array
        count++;                       // Increase the count of items
        token = strtok(NULL, "[,] ");  // Get the next token
    }

    // Output the results
    printf("The items are:\n");
    for (int i = 0; i < count; i++) {
        printf("%s\n", items[i]);
    }

    return 0;
}
