JavaScript (Input)

TypeScript (Output)