Remove duplicate elements from the given linked list

Given a linked list, you are asked to remove all the duplicates and print the resulting list with only unique values.

Input

The initial data for the linked list is obtained automatically. You don’t need to do anything. It’s guaranteed that the size of the linked list does not exceed and the values don’t exceed in absolute value.

Output

The program should print the final linked list.

Examples

Input
Output
10 4 8 4 0 -2 8 2 8 0 4
4 8 0 -2 2
Β 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in