public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(
				System.in))) {
			String[] firstLine = br.readLine().split("\\s+");
			int n = Integer.valueOf(firstLine[0]);
			int m = Integer.valueOf(firstLine[1]);
			int[] changes = new int[n];
			int size = 0;
			String[] secondLine = br.readLine().split("\\s+");
			for (int i = 0; i < n; i++) {
				int x = Integer.valueOf(secondLine[i]);
				if (x <= m) {
					changes[size++] = x;
				}
			}
			changes = Arrays.copyOf(changes, size);
			// boolean rt = findCoins(coins, m, changes, 0);
			Iterable<Integer> coins = findCoins0(m, changes);
			if (coins != null) {
				Iterator<Integer> iter = coins.iterator();
				System.out.print(iter.next());
				while (iter.hasNext()) {
					System.out.print(" " + iter.next());
				}
				System.out.println();
			} else {
				System.out.println("No Solution");
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}