while (<>) { my @fields = split; for (my $i=$#fields; $i>=0; $i-=2) { print "$fields[$i] "; } print "\n"; }