#!/usr/bin/perl
while (<STDIN>)
{
	($t, $v1, $t1, $v2, $t2, $v3, $t3, $v4, $t4, $v5, $t5, $v6, $t6, $v7, $t7) =
		split /,/, $_;
	$t7 -= $t1; $t6 -= $t1; $t5 -= $t1; $t4 -= $t1; $t3 -= $t1; $t2 -= $t1; $t1 -= $t1;
	print "$t\t$t1\t$t2\t$t3\t$t4\t$t5\t$t6\t$t7\n";
}
