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

char buff[100];

void build32(char * ptr)
{
	char * sa = ptr;
	char * sr = strchr(sa,':') + 1;
	char * sg = strchr(sr,':') + 1;
	char * sb = strchr(sg,':') + 1;
	
	putchar((unsigned char)(atof(sr)*256));
	putchar((unsigned char)(atof(sg)*256));
	putchar((unsigned char)(atof(sb)*256));
	putchar((unsigned char)(atof(sa)*256));
}

int main(void)
{
	buff[37] = EOF;
	char c = 'a';
	int i = 0;
	while (c != EOF)
	{
		c = getchar();
		if (c !='\n')
		{
			if (c != ' ')
			{
				//count number of ' ' by the way for other mode 
				buff[i] = c;	//build buffer
				i++;
			}
			else
			{
				buff[i] = ' ';
				build32((char*)buff);
				for (i=0;i<37;i++)
				{
					buff[i] = ' ';
				}	
				i = 0;		
			}
		}
		else
		{
			//fill with 0 if not 32bits
		}
	}

	return 0;
}
