#include<bits/stdc++.h>

using namespace std;

const int N = 105;

int n, k, MOD;

void sub(int& x, int y){
    x-=y;
    if(x<0)x+=MOD;
}

void add(int& x, int y){
    x+=y;
    if(x>MOD)x-=MOD;
}

int dp[N][N*N*N];

void solve(){
    dp[0][0]=1;
    for(int i=1;i<=n;++i){
        int up=k*(i+1)*i/2;
        for(int j=0;j<=up;++j){
            dp[i][j]=dp[i-1][j];
            if(j>=i){
                add(dp[i][j],dp[i][j-i]);
            }
        }
        for(int j=up;j>=(k+1)*i;--j){
            sub(dp[i][j],dp[i][j-(k+1)*i]);
        }
    }
}

void getAns(){
    for(int i=1;i<=n;++i){
        int ans=0;
        int l=i-1, r=n-i;
        int up=min(k*l*(l+1)/2,k*r*(r+1)/2);
        for(int j=0;j<=up;++j){
            add(ans,1ll*dp[l][j]*dp[r][j]%MOD);
        }
        ans=1ll*ans*(k+1)%MOD;
        add(ans,-1);
        cout<<ans<<endl;
    }
}

int main(){
    cin>>n>>k>>MOD;

    solve();

    getAns();

    return 0;
}

#line 1 "main.cpp"

/**
 * @title Template
 */

#include <iostream>
#include <algorithm>
#include <utility>
#include <numeric>
#include <vector>
#include <array>
#include <cassert>
#include <iomanip>

#line 2 "/Users/kodamankod/Desktop/cpp_programming/Library/other/range.cpp"

#line 4 "/Users/kodamankod/Desktop/cpp_programming/Library/other/range.cpp"

class range {
  struct iter {
    std::size_t itr;
    constexpr iter(std::size_t pos) noexcept: itr(pos) { }
    constexpr void operator ++ () noexcept { ++itr; }
    constexpr bool operator != (iter other) const noexcept { return itr != other.itr; }
    constexpr std::size_t operator * () const noexcept { return itr; }
  };

  struct reviter {
    std::size_t itr;
    constexpr reviter(std::size_t pos) noexcept: itr(pos) { }
    constexpr void operator ++ () noexcept { --itr; }
    constexpr bool operator != (reviter other) const noexcept { return itr != other.itr; }
    constexpr std::size_t operator * () const noexcept { return itr; }
  };

  const iter first, last;

public:
  constexpr range(std::size_t first, std::size_t last) noexcept: first(first), last(std::max(first, last)) { }
  constexpr iter begin() const noexcept { return first; }
  constexpr iter end() const noexcept { return last; }
  constexpr reviter rbegin() const noexcept { return reviter(*last - 1); } 
  constexpr reviter rend() const noexcept { return reviter(*first - 1); } 
};

/**
 * @title Range
 */
#line 2 "/Users/kodamankod/Desktop/cpp_programming/Library/other/rev.cpp"

#include <type_traits>
#include <iterator>
#line 6 "/Users/kodamankod/Desktop/cpp_programming/Library/other/rev.cpp"

template <class T>
class rev_impl {
public:
  using iterator = decltype(std::rbegin(std::declval<T>()));

private:
  const iterator M_begin;
  const iterator M_end;

public:
  constexpr rev_impl(T &&cont) noexcept: M_begin(std::rbegin(cont)), M_end(std::rend(cont)) { }
  constexpr iterator begin() const noexcept { return M_begin; }
  constexpr iterator end() const noexcept { return M_end; }
};

template <class T>
constexpr decltype(auto) rev(T &&cont) {
  return rev_impl<T>(std::forward<T>(cont));
}

/**
 * @title Reverser
 */
#line 17 "main.cpp"

using i32 = std::int32_t;
using i64 = std::int64_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;

constexpr i32 inf32 = (u32) ~0 >> 2;
constexpr i64 inf64 = (u64) ~0 >> 2;

template <class T>
using Vec = std::vector<T>;

using f80 = long double;

int main() {
  usize N, M, K;
  std::cin >> N >> M >> K;
  Vec<bool> ok(N + 1, true);
  while (K--) {
    usize i;
    std::cin >> i;
    ok[i] = false;
  }
  Vec<std::pair<f80, f80>> dp(N + 1);
  std::pair<f80, f80> sum;
  const f80 invM = 1.0L / (double) M;
  for (auto i: rev(range(0, N))) {
    if (!ok[i]) {
      dp[i].first = 1.0L;
    }
    else {
      dp[i].first = sum.first * invM;
      dp[i].second = sum.second * invM + 1;
    }
    sum.first += dp[i].first;
    sum.second += dp[i].second;
    if (i + M <= N) {
      sum.first -= dp[i + M].first;
      sum.second -= dp[i + M].second;
    }
  }
  std::cout << std::fixed << std::setprecision(10);
  if (std::abs(1.0L - dp[0].first) < 1e-9) {
    std::cout << -1 << '\n';
  }
  else {
    std::cout << dp[0].second / (1.0L - dp[0].first) << '\n';
  }
  return 0;
}
