#!/usr/bin/awk -f

{
	# Read tasks line-by-line

	# Our task is to print all not empty
	# substrings of the input string
	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)
		}
	}

	# End of task marker, empty line by default
	print ""

	# In the end, stdout must be flushed
	fflush()
}
