#include <random>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main(int argc, char **argv) {
    unsigned int limit;
    if(argc == 2)
        limit = (int)strtoul(argv[1], NULL, 10);
    else
        limit = 16777215;
    random_device rd;
    uniform_int_distribution<int> dist(0,limit);
    printf("%.6x\n", (unsigned int)dist(rd));
}
