package main

import (
	"fmt"
	"strings"
	"unicode"
)

func main() {
	f := NewFourIsSeq()
	fmt.Print("The lengths of the first 201 words are:")
	for i := 1; i <= 201; i++ {
		if i%25 == 1 {
			fmt.Printf("\n%3d: ", i)
		}
		_, n := f.WordLen(i)
		fmt.Printf("%2d", n)
	}
	fmt.Println()
	fmt.Println("Length of sentence so far:", f.TotalLength())
	
	for i := 1000; i <= 1e7; i *= 10 {
		w, n := f.WordLen(i)
		fmt.Printf("Word%8d is%q, with%d letters.", i, w, n)
		fmt.Println("  Length of sentence so far:", f.TotalLength())
	}
}

type FourIsSeq struct {
	i     int