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

int format = 8;

int main(int argc, char * argv[])
{
	if (argc == 2)
	{
		format = atoi(argv[1]);
	}
	char word[20];
	int wc = 0;
	char c;
	while (c != EOF)
	{
		c = getchar();
		if (c == '_')
		{
			putchar('_');		
		}
		else
		{
			if ((c != EOF)&&(c != '\n')&&(c != ' ')&&(c != ':'))
			{
				word[wc] = c;
				wc++;	
			}		
			else
			{
				double pitch = atof(word);
				if (pitch != 0)
				{
					if (format == 8)
					{
						printf("%0.3f",pitch);
					}
					if (format == 16)
					{
						printf("%0.5f",pitch);
					}
				}
				putchar(c);
				//clear the string
				for (wc = 0;wc < 20; wc++)
				{
					word[wc] = ' ';
				}	
				wc = 0;	
			}
		}
	}
	return 0;
}
