#! /usr/bin/perl -w

use strict;

my @lines = <STDIN>;
my @line;
my @len   = (0,1,1,1,1,1);
my $s;

chomp @lines;

foreach (@lines) {
	/([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t(.*)/;
	next unless $3;
	@line = (0, $1 || "", $2 || "", $3 || "", $4 || "", $5 || "", $6 || "");
	s/^"\s*// foreach (@line);
	s/\s*"$// foreach (@line);
	for (my $i = 1; $i < 7; $i++) {
		$len[$i] = $len[$i]<length($line[$i]) ? length($line[$i]) : $len[$i];
	}
}
$len[3] = $len[3]>13 ? 13 : $len[3];
$s = "%".$len[1]."s %".$len[2]."s %".$len[3]."s %".$len[4]."s %".$len[5]."s %s\n";

foreach (@lines) {
	/([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t([^\t]*)?\t(.*)/;
	@line = ($1 || "", $2 || "", $3 || "", $4 || "", $5 || "", $6 || "");
	s/^"\s*// foreach (@line);
	s/\s*"$// foreach (@line);

	if ($line[2] || $line[3] || $line[4]) {
		printf $s, @line;
	} else {
		print join(" ", @line)."\n";
	}
}
