Simple, although correct, Tcl solution.