j,c;f(char*s){for(j=8;c=strtol(s,0,j);j=j*j/6)isprint(c)?printf("%c ",c):0;}

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

int main (int argc, char **argv) {
    int i;

    char *testcases[] = {
        "31", "47", "69", "7A", 
	"100", "156", "189", "potaTO",
	"5G", "19", NULL
    };

    for (i = 0 ; testcases[i]; i++) {
        f(testcases[i]);
        puts("");
    }

    return 0;
}
