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

main()
{
  char *c;
  char *d;
  char *name;
  char buf[BUFSIZ];
  int b1, b2, b3, b4, b5, b6;
  int total;

  while(fgets(buf, sizeof(buf), stdin))
    {
      c = buf;
      d = index(buf, '\t');
      *d++ = '\0';
      name = c;

      c = d;
      d = index(d, '\t');
      *d++ = '\0';
      b1 = atoi(c);

      c = d;
      d = index(d, '\t');
      *d++ = '\0';
      b2 = atoi(c);

      c = d;
      d = index(d, '\t');
      *d++ = '\0';
      b3 = atoi(c);

      c = d;
      d = index(d, '\t');
      *d++ = '\0';
      b4 = atoi(c);

      c = d;
      d = index(d, '\t');
      *d++ = '\0';
      b5 = atoi(c);

      c = d;
      d = index(d, '\n');
      *d++ = '\0';
      b6 = atoi(c);

      total = b1 + b2 + b3 + b4 + b5 + b6;
      printf("%s\t%d\t%d\t%d\t%d\t%d\t%u\n", name, (b1* 100)/total,
	     (b2 * 100)/total, (b3 * 100)/total, 
	     (b4 * 100)/total, (b5 * 100)/total,
	     (b6 * 100)/total); 
      
    }
}
