In this paper, a two-hop network in which the information is transmitted from a source via a relay to a destination is considered. It is assumed that both channels are quasi-static fading and all nodes are equipped with a single antenna. The knowledge of the channel for each transmission hop is only available at the corresponding receiver. The relay is assumed to be simple, i.e., not capable of data buffering over multiple coding blocks or rescheduling tasks. Considering a continuum of multilevel codes at both of the source and the relay, in conjunction with decode and forward strategy, we present a scheme to optimally allocate the available source and relay powers to different levels of their multilevel codes. Assuming Rayleigh fading, the performance of this scheme is also evaluated and compared with the previously known strategies.