#!/opt/anaconda1anaconda2anaconda3/bin/perl 

eval 'exec /opt/anaconda1anaconda2anaconda3/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use strict;

my $delimeter = ($ARGV[0] eq '-s') ? '\s+' : '\t';

while (<STDIN>) {
    
	unless (/\w/) {
		print "0\n\n";
		next;
	}

	chomp;
    my $x = 0;
    my @x = split (/$delimeter/);
    foreach my $word (@x) {
		print "$x\t$word\n";
		$x++;
    }
    print "\n";
    #last;
}
