Optimization of placement and resource allocation in UAV-aided multi-hop wireless networks