Solution
= Solution
Buy one maturity-$(T-1)$ bond. When it pays one at $T-1$, use all proceeds to buy $1/P_{T-1}^T$ maturity-$T$ bonds. Short $1+f$ maturity-$T$ bonds. The terminal payoff is
$$
\frac1{P_{T-1}^T}-(1+f)=r_T-f.
$$
Its initial replication cost is
$$
\xi_0=P_0^{T-1}-(1+f)P_0^T,
$$
which vanishes for $f=P_0^{T-1}/P_0^T-1$.