reverse output string