package q1114 type Foo struct { one, two chan struct{} } func NewFoo() *Foo { return &Foo{ one: make(chan struct{}), two: make(chan struct{}), } } func (f *Foo) First(printFirst func()) { // Do not change this line printFirst() close(f.one) } func (f *Foo) Second(printSecond func()) { <-f.one /// Do not change this line printSecond() close(f.two) } func (f *Foo) Third(printThird func()) { <-f.two // Do not change this line printThird() }