#!/usr/bin/perl -w

use strict;

@ARGV == 0
	or die "syntax: $0 < input > output\n";

my $line;

while (defined ($line = <STDIN>)) {
	chomp $line;
	my $last = "\t";
	my @out;
	for (sort split /\t/, $line, -1) {
		push @out, $_ unless $_ eq $last;
		$last = $_;
	}
	print join "\t", @out;
	print "\n";
}
