- Time limit: 1.00 s
- Memory limit: 512 MB
After an epic heist crew recruitment montage, a group of aliens is preparing to steal all the cows on Earth! There are cow farms on Earth and the -th farm has cows. The team needs to move swiftly, so they need to fine tune their ship's tractor beams. The ship has tractor beams and the -th tractor beam can be tuned to pull in exactly cows. As a member of the crew your task is to tune the tractor beams in such a way that you can steal all the cows from any of the farms in a single pull.
Formally, for each in , there should be a subset of the tractor beams that can pull in exactly cows. If there are multiple answers, print any.
Input
The first line contains a single integer .
The next line contains integers .
Output
Print integers in a line.
Constraints
Example 1
Input:
3 4 5 6
Output:
4 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Explanation:
The sets of beams that can be used to pull in the cows are: for farm , for farm and for farm .
Example 2
Input:
6 4 2 3 10 7 1
Output:
1 2 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Explanation:
The sets are , , , , and .