#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int SIZE = 1e6 + 1010;
int dp[SIZE];
int a[SIZE];
void mii(int& x, int v) {
  if (x == -1 || x > v) x = v;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (n); ++i) scanf("%d", &(a[i]));
  sort(a, a + n);
  int base = a[0];
  for (int i = (1); i < (n); ++i) a[i] -= base;
  memset(dp, 0x3f3f3f3f, sizeof(dp));
  dp[0] = 0;
  for (int i = 0; i < (1000000); ++i) {
    for (int j = (1); j < (n); ++j) {
      dp[i + a[j]] = min(dp[i + a[j]], dp[i] + 1);
    }
  }
  for (int i = 0; i < (1000000); ++i)
    if (dp[i] != -1 && dp[i] <= k) printf("%d ", i + base * k);
  return 0;
}
