Time limit
2s
Memory limit
128 MB
Snow White was living peacefully with the seven dwarfs when a problem occurred. After the day's work, nine dwarfs returned instead of seven.
Each of the nine dwarfs claims to be one of the real seven dwarfs. Snow White remembers that the sum of the heights of the real seven dwarfs is 100.
Given the heights of the nine dwarfs, write a program that finds and prints seven dwarfs whose heights sum to 100.
Nine lines are given. Each line contains one dwarf's height. Every height is a natural number not greater than 100, and all nine heights are distinct.
If there are multiple valid answers, you may print any one of them.
Print the heights of the seven dwarfs in ascending order, one per line.
A valid set of seven dwarfs is guaranteed to exist.