f0() is called, num = 0
f1() is called, num = 1
f2() is called, num = 2
