891. Largest Special Subset
Given a set of positive integers nums, find the largest subset, answer, that satisfies a special property. The special property states that for every pair of elements (result[i], result[j]) in the subset, either result[i] is divisible by result[j] or result[j] is divisible by result[i]. If there are multiple solutions, return the lexicographically smallest subset.
The first line of the input should contain an integer n, which represents the size of the nums array. The following n lines should each contain an integer element of the nums array.
Print the lexicographically smallest subset, answer, as a space-separated list of integers.
3 1 2 3