/*
 * Take a single string as an argument and format it into 32-character blocks.
 */

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

int main(int argc, char **argv) {
    if (argc != 2) {
        fprintf(stderr, "invalid number of arguments\n");
        exit(1);
    }
    int i;
    for (i = 0; i < strlen(argv[1]); i++) {
        int c = argv[1][i];
        printf("%c", c);
        if (i % 32 == 31)
            printf("\n");
    }
    if (i % 32 != 0)
        printf("\n");

    return 0;
}
