Remove trailing commas from `Input`