#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const long double pi = acos(-1);
long long inv(long long a, long long m) {
  long long b = m - 2;
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
int root = 15311432;
const int rooti = 469870224;
const int mx = 1 << 23;
void ntt(vector<int> &a, bool invert) {
  auto r = [&](int n, int log) {
    int res = 0;
    for (int i = 0; i < log; i++) {
      if ((n >> i) & 1) res |= 1 << (log - 1 - i);
    }
    return res;
  };
  int n = (int)a.size();
  int log = 0;
  while ((1 << log) < n) log++;
  for (int i = 0; i < n; i++) {
    if (i < r(i, log)) swap(a[i], a[r(i, log)]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    long long wn = invert ? rooti : root;
    for (int j = len; j < mx; j <<= 1) (wn *= wn) %= mod;
    for (int j = 0; j < n; j += len) {
      long long w = 1;
      for (int k = 0; k < len / 2; k++) {
        int u = a[j + k], v = int(1ll * w * a[j + k + (len >> 1)] % mod);
        a[j + k] = u + v < mod ? u + v : u + v - mod;
        a[j + k + (len >> 1)] = u - v >= 0 ? u - v : u - v + mod;
        (w *= wn) %= mod;
      }
    }
  }
  if (invert) {
    n = (int)inv(n, mod);
    for (int &c : a) {
      c = int(1LL * c * n % mod);
    }
  }
}
vector<int> mult(vector<int> a, vector<int> b) {
  int n = 1, m = int(a.size() + b.size() - 1);
  while (n < a.size() + b.size()) {
    n <<= 1;
  }
  a.resize(n);
  b.resize(n);
  ntt(a, false);
  ntt(b, false);
  for (int i = 0; i < n; i++) {
    a[i] = int(1ll * a[i] * b[i] % mod);
  }
  ntt(a, true);
  a.resize(m);
  return a;
}
void normalise(vector<int> &a) {
  for (int i = 0; i < a.size(); i++) {
    if (a[i]) {
      a[i] = 1;
    }
  }
}
vector<int> polypow(vector<int> a, long long b) {
  vector<int> res = {1};
  while (b > 0) {
    if (b & 1) {
      res = mult(res, a);
      normalise(res);
    }
    a = mult(a, a);
    normalise(a);
    b >>= 1;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, n, m, k, q, a, b, c, d, l, r, z, p;
  cin >> n >> k;
  vector<int> v(1001);
  for (int i = 0; i < n; i++) {
    cin >> a;
    v[a] = 1;
  }
  while (v.back() == 0) {
    v.pop_back();
  }
  v = polypow(v, k);
  for (int i = 0; i < v.size(); i++) {
    if (v[i]) {
      cout << i << ' ';
    }
  }
  cout << '\n';
  return 0;
}
