Two buildings A and B are 20 m apart. Building A has a window at a height of 50 m above the ground, and building B has a window at height 30 m from the ground. At what speed must a man throw a ball horizontally from the window of building A so that it enters the window of building B. Take g=10 m/s2.