reverse line of input