#include "stdlib.h"
#include "stdio.h"
#ifndef time
#include "time.h"
#endif
#ifndef crypt
#define __USE_XOPEN
#include "unistd.h"
#endif

char s[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890./";
char name[64], passwd[64], salt[3];

void main (void)
{
  srand ((int) time (NULL));

  while (scanf ("%s%s", name, passwd) == 2)
  {
    salt[0] = s[ rand() % sizeof (s) ];
    salt[1] = s[ rand() % sizeof (s) ];
    salt[2] = '\0';

    printf ("%s:%s\n", name, crypt (passwd, salt));
  }
}

