#C14120. Modify List

    ID: 43735 Type: Default 1000ms 256MiB

Modify List

Modify List

You are given a list of integers. Your task is to modify the list by applying the following rules:

  • All negative numbers are replaced by their absolute values.
  • All positive numbers remain unchanged.
  • All zeros are removed from the list.

For instance, if the input list is [-1, 2, 0, -3, 5, 0, -7], the output should be [1, 2, 3, 5, 7].

You will need to read the input from standard input (stdin) and print the output to standard output (stdout). The list elements in the input are provided as space-separated integers in a single line, and the output should also be a single line of space-separated integers.

inputFormat

The input consists of a single line containing space-separated integers. If the input line is empty, then the list is considered empty.

outputFormat

The output should be a single line containing the modified list's integers as space-separated values. If the modified list is empty, the output should be an empty line.

## sample
-1 -2 -3
1 2 3