With the rapid development and evolvement of unmanned aerial vehicle (UAV) technology, UAV aided wireless communication technology has been widely studied recently. In this paper, a buffer aided multi-UAV relaying network is investigated to assist blocked ground communication. According to the mobility and implementation flexibility of UAV relays, it is assumed that the communication link between air-to-ground is the Rician fading channel. On the basis of information causality, we derive the state change of the information in the buffer of UAV relays and maximize the end-to-end average throughput by join the relay selection, UAV transmit power, and UAV trajectory optimization. However, the considered problem is a mixed integer non-convex optimization problem, and therefore, it is difficult to solve directly with general optimization methods. In order to make the problem tractable, an efficient iterative algorithm based on the block coordinate descent and the successive convex optimization techniques is proposed. The convergence of the proposed algorithm will be verified analytically at the end of this paper. The simulation results show that by alternately optimizing the relay selection, UAV transmit power, and UAV trajectory, the proposed algorithm is able to achieve convergence quickly and significantly improve the average throughput, as compared to other benchmark schemes.