#!/usr/bin/awk -f

{
	# here we print all not empty substrings
	# of the input string (this is our task)
	len=length($0)

	for (i=1; i <= len; ++i){
		for (j=i; j <= len; ++j){
			sz = j-i+1
			printf "substr[%d,%d]=%s\n", i, sz, substr($0, i, sz)
		}
	}

	# print end of task marker here
	print ""

	# end of task MUST BE FLUSHED!!!
	fflush()
}
