Any person who, with intent to injure or to endanger the Safety of any person travelling by any railway, whether a particular person or not- (1) places anything on the railway; or (2) deals with the railway, or with anything whatever upon or near the railway, in such a manner as to affect or endanger the free and safe use of the railway or the safety of any such person; or (3) shoots or throws any